Role fixup from David House. fixes #2024

git-svn-id: http://svn.automattic.com/wordpress/trunk@3266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-05 03:11:55 +00:00
parent 57ce56e8f4
commit 6fbd70fcdb
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permi
// print_r($profileuser);
echo '<select name="role">';
foreach($wp_roles->role_names as $role => $name) {
$selected = ($profileuser->roles[0] == $role) ? ' selected="selected"' : '';
$selected = ($profileuser->has_cap($role)) ? ' selected="selected"' : '';
echo "<option value=\"{$role}\"{$selected}>{$name}</option>";
}
echo '</select>';