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-admin/user-edit.php

    r2889 r2995  
    8383<input type="text" name="user_login" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
    8484</label></p>
     85
     86<p><label><?php _e('Role:') ?><br />
     87<?php
     88// print_r($profileuser);
     89echo '<select name="role">';
     90foreach($wp_roles->role_names as $role => $name) {
     91    $selected = ($profileuser->roles[0] == $role) ? ' selected="selected"' : '';
     92    echo "<option value=\"{$role}\"{$selected}>{$name}</option>";
     93}
     94echo '</select>';
     95?></label></p>
     96
    8597<p><label><?php _e('First name:') ?><br />
    8698<input type="text" name="first_name" value="<?php echo $profiledata->first_name ?>" /></label></p>
Note: See TracChangeset for help on using the changeset viewer.