Deprecate get_userdatabylogin() and get_user_by_email(). Props scribu. fixes #18333

git-svn-id: https://develop.svn.wordpress.org/trunk@18513 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2011-08-05 16:57:31 +00:00
parent 15507ec835
commit eda7d43e85
8 changed files with 46 additions and 40 deletions

View File

@@ -1296,7 +1296,7 @@ function clean_user_cache($id) {
* @return null|int The user's ID on success, and null on failure.
*/
function username_exists( $username ) {
if ( $user = get_userdatabylogin( $username ) ) {
if ( $user = get_user_by('login', $username ) ) {
return $user->ID;
} else {
return null;
@@ -1313,7 +1313,7 @@ function username_exists( $username ) {
* @return bool|int The user's ID on success, and false on failure.
*/
function email_exists( $email ) {
if ( $user = get_user_by_email($email) )
if ( $user = get_user_by('email', $email) )
return $user->ID;
return false;