WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-login.php

    r8314 r8412  
    130130    do_action('retrieve_password', $user_login);
    131131
     132    $allow = apply_filters('allow_password_reset', true, $user_data->ID);
     133
     134    if ( ! $allow )
     135        return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));
     136    else if ( is_wp_error($allow) )
     137        return $allow;
     138       
    132139    $key = $wpdb->get_var($wpdb->prepare("SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s", $user_login));
    133140    if ( empty($key) ) {
Note: See TracChangeset for help on using the changeset viewer.