function view_profiles_perms_permission_name in View profiles permissions 7
Same name and namespace in other branches
- 6 view_profiles_perms.module \view_profiles_perms_permission_name()
Helper function to build the permission name
2 calls to view_profiles_perms_permission_name()
- view_profiles_perms_access in ./
view_profiles_perms.module - Access callback for user profiles.
- view_profiles_perms_permission in ./
view_profiles_perms.module - Implements hook_permission().
File
- ./
view_profiles_perms.module, line 30 - Restricts viewing user profiles based on user roles
Code
function view_profiles_perms_permission_name($role_name) {
return array(
"access {$role_name} profiles" => array(
'title' => t("Access to %role_name profiles", array(
'%role_name' => $role_name,
)),
'description' => t('Grant access to user profiles to this role'),
),
);
}