If anyone should be faced with this problem, check if you have defined a callback function to set the user_login on pre_user_login
. This filter is applied inside the wp_insert_user()
-function and produced a same username again. Therefore the nicename was changed by adding a “-2”.
So, my problem was that I reset the user_logins again and again, instead of only once when registering.