diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-09-16 13:15:28 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-09-16 13:15:28 +0000 |
commit | 22b8be2c9ef6117a480695ae21758433dbece73b (patch) | |
tree | 7ef6a8f0ea46d4774c0c457e38cbb2fdb4b5e986 /modules | |
parent | 2d1e9126cb10f52e7711ce121f8bdaa5bdc71aa4 (diff) | |
download | brdo-22b8be2c9ef6117a480695ae21758433dbece73b.tar.gz brdo-22b8be2c9ef6117a480695ae21758433dbece73b.tar.bz2 |
- fixed the access_get_role() problem reported by Remco
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user.module | 10 | ||||
-rw-r--r-- | modules/user/user.module | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/modules/user.module b/modules/user.module index 048556be6..1a531be22 100644 --- a/modules/user.module +++ b/modules/user.module @@ -924,6 +924,14 @@ function user_admin_access($edit = array()) { } +function user_roles() { + $result = db_query("SELECT * FROM role ORDER BY name"); + while ($role = db_fetch_object($result)) { + $roles[$role->name] = $role->name; + } + return $roles; +} + function user_admin_perm($edit = array()) { global $REQUEST_URI; @@ -1058,7 +1066,7 @@ function user_admin_edit($edit = array()) { $output .= form_item(t("Drupal ID"), strtolower(urlencode($account->name) ."@$HTTP_HOST")); $output .= form_item(t("Jabber ID"), check_output($account->jabber)); $output .= form_select("Status", "status", $account->status, array("blocked", "active")); - $output .= form_select("Role", "role", $account->role, access_get_roles()); + $output .= form_select("Role", "role", $account->role, user_roles()); $output .= form_submit("Save account"); $output .= form_submit("Delete account"); diff --git a/modules/user/user.module b/modules/user/user.module index 048556be6..1a531be22 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -924,6 +924,14 @@ function user_admin_access($edit = array()) { } +function user_roles() { + $result = db_query("SELECT * FROM role ORDER BY name"); + while ($role = db_fetch_object($result)) { + $roles[$role->name] = $role->name; + } + return $roles; +} + function user_admin_perm($edit = array()) { global $REQUEST_URI; @@ -1058,7 +1066,7 @@ function user_admin_edit($edit = array()) { $output .= form_item(t("Drupal ID"), strtolower(urlencode($account->name) ."@$HTTP_HOST")); $output .= form_item(t("Jabber ID"), check_output($account->jabber)); $output .= form_select("Status", "status", $account->status, array("blocked", "active")); - $output .= form_select("Role", "role", $account->role, access_get_roles()); + $output .= form_select("Role", "role", $account->role, user_roles()); $output .= form_submit("Save account"); $output .= form_submit("Delete account"); |