Username as Email
-
For a long time I used login and email separately in the registration form. Now I removed the login field and added the username/email field instead of mail.
And there was a problem.
The user is created with login user@mail.com
But the link to their profile looks like site.com/user/usermail-comThis is incorrect because the profile works link site.com/user/user@mail.com
Why when you go to the profile plugin removes @ and change . on – ?
Although in the database and username looks like user@mail.comfunction generate_profile_slug removes @ and . that breaks all logic
How can I remove conditions?
$user_in_url = str_replace( '@', '', $user_in_url ); if ( ( $pos = strrpos( $user_in_url, '.' ) ) !== false ) { $search_length = strlen( '.' ); $user_in_url = substr_replace( $user_in_url, '-', $pos, $search_length ); }
to link the user was the same as email!
- The topic ‘Username as Email’ is closed to new replies.