- Patch #755870 by David_Rothstein: fixed PHP notice for undefined variable in user_roles().

merge-requests/26/head
Dries Buytaert 2010-04-01 12:22:39 +00:00
parent b4b31c1039
commit fe26a90789
1 changed files with 1 additions and 0 deletions

View File

@ -2512,6 +2512,7 @@ function user_roles($membersonly = FALSE, $permission = NULL) {
$result = db_query('SELECT rid, name FROM {role} ORDER BY weight, name');
}
$roles = array();
foreach ($result as $role) {
switch ($role->rid) {
// We only translate the built in role names