Return ID not user_login.
git-svn-id: https://develop.svn.wordpress.org/trunk@3351 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
35258f7f4c
commit
2294967988
@ -5,7 +5,7 @@ function username_exists( $username ) {
|
||||
$username = sanitize_user( $username );
|
||||
$user = get_userdatabylogin($username);
|
||||
if ( $user )
|
||||
return $user->user_login;
|
||||
return $user->ID;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user