mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Show Role in profile and user edit. Don't allow users with edit_users caps to demote themselves. Props: davidhouse, ringmaster. fixes #1825
git-svn-id: https://develop.svn.wordpress.org/trunk@2995 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -59,7 +59,12 @@ function wp_insert_user($userdata) {
|
||||
update_usermeta( $user_id, 'jabber', $jabber );
|
||||
update_usermeta( $user_id, 'aim', $aim );
|
||||
update_usermeta( $user_id, 'yim', $yim );
|
||||
|
||||
|
||||
if ($update && !empty($role)) {
|
||||
$user = new WP_User($user_id);
|
||||
$user->set_role($role);
|
||||
}
|
||||
|
||||
if ( !$update ) {
|
||||
$user = new WP_User($user_id);
|
||||
$user->set_role(get_settings('default_role'));
|
||||
|
||||
Reference in New Issue
Block a user