WordPress.org

Make WordPress Core

Changeset 8400


Ignore:
Timestamp:
07/22/08 19:15:42 (7 years ago)
Author:
ryan
Message:

Allow disabling password reset per user. Props axelseaa. fixes #7344 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r8314 r8400  
    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.