Ejemplo n.º 1
0
 /**
  * Allow Password Reset
  */
 function allow_password_reset($allow, $user_ID)
 {
     if (absint($user_ID) > 0) {
         $u = new Expire_User($checkuser->ID);
         if ($u->is_expired()) {
             $allow = new WP_Error('expire_users_expired_password_reset', sprintf('<strong>%s</strong> %s', __('ERROR:'), __('Your user details have expired so you are no longer able to reset your password.', 'expire-users')));
         }
     }
     return $allow;
 }
Ejemplo n.º 2
0
 /**
  * Manage Users Custom Column
  */
 function manage_users_custom_column($value, $column_name, $user_id)
 {
     $user = get_userdata($user_id);
     $value = '';
     if ('expire_user' == $column_name) {
         $u = new Expire_User($user_id);
         $expire_date = get_user_meta($user_id, '_expire_user_date', true);
         if ($expire_date) {
             $value = date_i18n(get_option('date_format') . ' @ ' . get_option('time_format'), $expire_date);
             if ($u->is_expired()) {
                 $value = date_i18n(get_option('date_format'), $expire_date);
                 $value = '<span class="expire-user-expired"><strong>' . $value . '</strong> <em>' . __('(expired)', 'expire-users') . '</em></span>';
             }
         }
     }
     return $value;
 }