Make WordPress Core

Changeset 21911


Ignore:
Timestamp:
09/19/2012 01:35:35 AM (12 years ago)
Author:
nacin
Message:

Deprecate user_pass_ok() in favor of wp_authenticate(). see #21907.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r21735 r21911  
    32253225}
    32263226
     3227/**
     3228 * Check that the user login name and password is correct.
     3229 *
     3230 * @since 0.71
     3231 * @deprecated 3.5.0
     3232 * @deprecated Use wp_authenticate()
     3233 * @see wp_authenticate()
     3234 *
     3235 * @param string $user_login User name.
     3236 * @param string $user_pass User password.
     3237 * @return bool False if does not authenticate, true if username and password authenticates.
     3238 */
     3239function user_pass_ok($user_login, $user_pass) {
     3240    _deprecated_function( __FUNCTION__, '3.5', 'wp_authenticate()' );
     3241    $user = wp_authenticate( $user_login, $user_pass );
     3242    if ( is_wp_error( $user ) )
     3243        return false;
     3244
     3245    return true;
     3246}
  • trunk/wp-includes/user.php

    r21876 r21911  
    190190
    191191    return $count;
    192 }
    193 
    194 /**
    195  * Check that the user login name and password is correct.
    196  *
    197  * @since 0.71
    198  * @todo xmlrpc only. Maybe move to xmlrpc.php.
    199  *
    200  * @param string $user_login User name.
    201  * @param string $user_pass User password.
    202  * @return bool False if does not authenticate, true if username and password authenticates.
    203  */
    204 function user_pass_ok($user_login, $user_pass) {
    205     $user = wp_authenticate($user_login, $user_pass);
    206     if ( is_wp_error($user) )
    207         return false;
    208 
    209     return true;
    210192}
    211193
Note: See TracChangeset for help on using the changeset viewer.