diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user.module | 6 | ||||
-rw-r--r-- | modules/user/user.module | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/user.module b/modules/user.module index 0f99be598..f87be38aa 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1671,6 +1671,12 @@ function user_admin_access() { return $output; } +/** + * Use this API to retreive an array of all available roles + * @param $membersonly Set this to TRUE to omit the special role 'anonymous'. + * @param $permission A string containing a permission. If set, only roles that have that permission are returned. + * @return An associative array, with the role id as key and the role name as value. + **/ function user_roles($membersonly = 0, $permission = 0) { $roles = array(); diff --git a/modules/user/user.module b/modules/user/user.module index 0f99be598..f87be38aa 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1671,6 +1671,12 @@ function user_admin_access() { return $output; } +/** + * Use this API to retreive an array of all available roles + * @param $membersonly Set this to TRUE to omit the special role 'anonymous'. + * @param $permission A string containing a permission. If set, only roles that have that permission are returned. + * @return An associative array, with the role id as key and the role name as value. + **/ function user_roles($membersonly = 0, $permission = 0) { $roles = array(); |