Skip to content

Commit

Permalink
New approach to PR #56 and issue #58. Unique usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed May 4, 2015
1 parent 87a2990 commit a914413
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/WP_Auth0_Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public static function create_user( $userinfo ){
if (empty($username)) {
$username = $email;
}
while(username_exists($username)) {
$username = $username . rand(0,9);
}
// Create the user data array for updating first- and lastname
$user_data = array(
'user_email' => $email,
Expand Down

0 comments on commit a914413

Please sign in to comment.