That looks like a problem with your unique indexes in the database.
Check these tables using phpmyadmin:
xf_user
xf_user_authenticate
xf_user_option
xf_user_privacy
xf_user_profile
The highest user_id should be the same in each of these tables. If any of them are higher than the xf_user table then that explains the error. A quick fix is to increase the AUTO_INCREMENT value in xf_user by selecting that table and clicking the Operations tab.