phpdoc and cleanup. see #11644

git-svn-id: https://develop.svn.wordpress.org/trunk@12826 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-01-25 22:01:43 +00:00
parent 0d90882b71
commit d33c4ae2ca
2 changed files with 35 additions and 18 deletions

View File

@@ -1608,13 +1608,13 @@ function get_user_id_from_string( $string ) {
$user_id = 0;
if ( is_email( $string ) ) {
$user = get_user_by_email($string);
$user = get_user_by('email', $string);
if ( $user )
$user_id = $user->ID;
} elseif ( is_numeric( $string ) ) {
$user_id = $string;
} else {
$user = get_userdatabylogin($string);
$user = get_user_by('login', $string);
if ( $user )
$user_id = $user->ID;
}