function merci_permissions_get_role in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Same name and namespace in other branches
- 6.2 modules/merci_permissions/merci_permissions.module \merci_permissions_get_role()
lookup the role by name
3 calls to merci_permissions_get_role()
- merci_permissions_get_permissions_for_role in modules/
merci_permissions/ merci_permissions.module - returns an array of permissions for a given role
- merci_permissions_grant_permissions in modules/
merci_permissions/ merci_permissions.module - Helper function to grant permissions to a role.
- merci_permissions_revoke_permissions in modules/
merci_permissions/ merci_permissions.module - Helper function to revoke permissions from a role.
File
- modules/
merci_permissions/ merci_permissions.module, line 325 - Provides functions for resetting permissions on the permission page.
Code
function merci_permissions_get_role($name) {
$role = db_fetch_object(db_query("SELECT * FROM {role} r WHERE r.name = '%s'", $name));
return $role;
}