WordPress.org

Make WordPress Core

Changeset 11442


Ignore:
Timestamp:
05/23/09 21:48:36 (6 years ago)
Author:
westi
Message:

Allow a different role to be set for users when they are created in a call to wp_insert_user(). Fixes #9891 props Denis-de-Bernardy.

File:
1 edited

Legend:

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

    r11331 r11442  
    212212    update_usermeta( $user_id, 'use_ssl', $use_ssl); 
    213213 
    214     if ( $update && isset($role) ) { 
     214    if ( isset($role) ) { 
    215215        $user = new WP_User($user_id); 
    216216        $user->set_role($role); 
    217     } 
    218  
    219     if ( !$update ) { 
     217    } elseif ( !$update ) { 
    220218        $user = new WP_User($user_id); 
    221219        $user->set_role(get_option('default_role')); 
Note: See TracChangeset for help on using the changeset viewer.