mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user