Log in with username/password: lyceum/lyceum

Changeset 1058

Show
Ignore:
Timestamp:
08/16/07 00:22:11 (1 year ago)
Author:
jjb
Message:

Allow the system admin to create users with any email address, even if there is a RegEx? restriction for general registration. Props to Asheesh, http://asheesh.org.

#779

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/lyceum/wp-admin/admin-functions.php

    r1036 r1058  
    458458   else if (!is_email($user->user_email))  
    459459         $errors['user_email'] = __('<strong>ERROR</strong>: The email address was invalid'); 
    460    else if (!preg_match(get_option('email_structure'), $user->user_email)) 
     460   else if ( ($userdata->user_email != $user->user_email) && !preg_match(get_option('email_structure'), $user->user_email)) // only check regex if the email address has changed 
    461461      $errors['user_email'] = '<strong>ERROR</strong>: That email address is not allowed for use on \''.get_settings('site_title')."'"; 
    462462    
  • trunk/src/lyceum/wp-register.php

    r1049 r1058  
    178178   } else if (!is_email($user_email)) { 
    179179      $errors['user_email'] = __('<strong>ERROR</strong>: The email address isn&#8217;t correct.<br/>'); 
    180    } else if (!preg_match(get_option('email_structure'), $user_email)){ 
     180   } else if (1 != $user_admin && !preg_match(get_option('email_structure'), $user_email)){ 
    181181      $errors['user_email'] = '<strong>ERROR</strong>: '.get_option('email_structure_error_message').'<br/>'; 
    182182   } else if (get_option('registration_list') && !in_array($user_email, explode(',', get_option('registration_list')))) { 
Log in with username/password: lyceum/lyceum