function avatar_selection_handler_filter_role in Avatar Selection 6
Same name and namespace in other branches
- 5.2 avatar_selection.module \avatar_selection_handler_filter_role()
- 5 avatar_selection.module \avatar_selection_handler_filter_role()
- 7 avatar_selection.admin.inc \avatar_selection_handler_filter_role()
Return a list of the existing roles.
Return value
Return the role id(s).
3 calls to avatar_selection_handler_filter_role()
- avatar_selection_edit_form in ./
avatar_selection.admin.inc - Create the form structure for listing the avatars and managing them in the 'Manage Avatars' tab under the Avatar Selection administration page.
- avatar_selection_roles_page in ./
avatar_selection.admin.inc - avatar_selection_upload_form in ./
avatar_selection.admin.inc - Create the form structure for uploading an avatar.
File
- ./
avatar_selection.admin.inc, line 777 - Administrative page callbacks for the avatar_selection module.
Code
function avatar_selection_handler_filter_role() {
$rids = array();
$result = db_query("SELECT r.rid, r.name FROM {role} r ORDER BY r.name");
while ($obj = db_fetch_object($result)) {
$rids[$obj->rid] = $obj->name;
}
return $rids;
}