Ticket #1825: admin-functions.php.patch
File admin-functions.php.patch, 701 bytes (added by , 20 years ago) |
---|
-
admin-functions.php
256 256 } 257 257 258 258 function edit_user($user_id = 0) { 259 global $current_user, $wp_roles; 259 260 260 261 if ($user_id != 0) { 261 262 $update = true; … … 276 277 if (isset ($_POST['pass2'])) 277 278 $pass2 = $_POST['pass2']; 278 279 280 if (isset ($_POST['role'])) { 281 if($user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap('edit_users')) 282 $user->role = $_POST['role']; 283 } 279 284 if (isset ($_POST['email'])) 280 285 $user->user_email = wp_specialchars(trim($_POST['email'])); 281 286 if (isset ($_POST['url'])) {