Reply To: User Profile Url uses the username. Can that be changed?
Thanks for sharing this! WHAT was BP thinking when they decided to use the username as profile url… I know why (only mandatory userdata on register), but imho the first thing to develop next is a solution to change this..
EDIT
When implementing your solution i found something.
Doing $user->data->user_nicename != $user->data->display_name in the first foreach loop will not work because when updating (second loop) the user_nicename you do a strtolower and str_replace.
If you want the check to work use the same conversion on the first loop.