Make WordPress Core


Ignore:
Timestamp:
03/18/2009 02:43:45 AM (17 years ago)
Author:
ryan
Message:

Trim trailing whitespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r10760 r10810  
    1111 *
    1212 * It seems that the first half is for backwards compatibility, but only
    13  * has the ability to alter the user's role. Wordpress core seems to 
     13 * has the ability to alter the user's role. Wordpress core seems to
    1414 * use this function only in the second way, running edit_user() with
    1515 * no id so as to create a new user.
     
    3232                if (!$editable_roles[$_POST['role']])
    3333                    wp_die(__('You can’t give users that role.'));
    34                
     34
    3535                $user = new WP_User( $user_id );
    3636                $user->set_role( $_POST['role'] );
     
    7878        // Don't let anyone with 'edit_users' (admins) edit their own role to something without it.
    7979        if( $user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap( 'edit_users' ))
    80             $user->role = $_POST['role']; 
     80            $user->role = $_POST['role'];
    8181
    8282        // If the new role isn't editable by the logged-in user die with error
     
    259259
    260260/**
    261  * Fetch a filtered list of user roles that the current user is 
    262  * allowed to edit. 
    263  *
    264  * Simple function who's main purpose is to allow filtering of the 
     261 * Fetch a filtered list of user roles that the current user is
     262 * allowed to edit.
     263 *
     264 * Simple function who's main purpose is to allow filtering of the
    265265 * list of roles in the $wp_roles object so that plugins can remove
    266266 * innappropriate ones depending on the situation or user making edits.
     
    268268 * capability can edit others to be administrators, even if they are
    269269 * only editors or authors. This filter allows admins to delegate
    270  * user management. 
     270 * user management.
    271271 *
    272272 * @since 2.8
     
    278278
    279279    $all_roles = $wp_roles->roles;
    280     $editable_roles = apply_filters('editable_roles', $all_roles); 
    281    
     280    $editable_roles = apply_filters('editable_roles', $all_roles);
     281
    282282    return $editable_roles;
    283283}
Note: See TracChangeset for help on using the changeset viewer.