Aurangajeb

Allowing non-latin characters in registration

Oct 30th, 2021
1,126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. add_filter('sanitize_user', 'non_strict_login', 10, 3);
  2. function non_strict_login( $username, $raw_username, $strict ) {
  3.  
  4.     if( !$strict )
  5.         return $username;
  6.  
  7.     return sanitize_user(stripslashes($raw_username), false);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment