Make WordPress Core


Ignore:
Timestamp:
11/06/2005 03:58:52 AM (18 years ago)
Author:
ryan
Message:

Show Role in profile and user edit. Don't allow users with edit_users caps to demote themselves. Props: davidhouse, ringmaster. fixes #1825

File:
1 edited

Legend:

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

    r2994 r2995  
    6060    update_usermeta( $user_id, 'aim', $aim );
    6161    update_usermeta( $user_id, 'yim', $yim );
    62    
     62
     63    if ($update && !empty($role)) {
     64        $user = new WP_User($user_id);
     65        $user->set_role($role);
     66    }
     67
    6368    if ( !$update ) {
    6469        $user = new WP_User($user_id);
Note: See TracChangeset for help on using the changeset viewer.