Username not sanitized when Facebook user doesn't have email
-
Hello,
When you register with Facebook through WSL, if your Facebook account doesn’t have an email account attached (you can register on Facebook with phone nuumber only) and you have set in WSL Settings Require E-mail, after manually entering your email your WordPress account will be created with spaces in the username.
As a quick fix I have copy pasted this block from wsl.authentication.php:591 to wsl.authentication.php:652, right before the userdata array is created.
// sanitize user login $user_login = sanitize_user( $user_login, true ); // remove spaces and dots $user_login = trim( str_replace( array( ' ', '.' ), '_', $user_login ) ); $user_login = trim( str_replace( '__', '_', $user_login ) );
I had that problem with the old versions too, I used to do the same thing.
- The topic ‘Username not sanitized when Facebook user doesn't have email’ is closed to new replies.