\cge_userops

Utility methods to deal with admin users.

Summary

Methods
Properties
Constants
expand_userlist()
get_grouplist()
expand_group_emails()
get_uid_emails()
get_uid_email()
get_admin_membergroups()
get_userlist()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

expand_userlist()

expand_userlist(mixed $useridlist) : array

A function to return an expanded list of user id's given an input list if one of the id's specified is negative, it is assumed to be a group id and is expanded to its members.

Parameters

mixed $useridlist

A comma separated string, or an array of userid's or negative group id's.

Returns

array

get_grouplist()

get_grouplist(boolean $inclnone) : array

Retrieve an associative array containing a list of CMSMS admin groups that is suitable for formatting in a dropdown.

Parameters

boolean $inclnone

Flag indicating whether "none" should be the first item.

Returns

array

expand_group_emails()

expand_group_emails(int $groupid) : string[]

Get all of the known email addresses for an admin group id

Parameters

int $groupid

The CMSMS admin group id

Returns

string[]

get_uid_emails()

get_uid_emails(int[] $list) : string[]

Get a list of email addresses matching a uid list

Parameters

int[] $list

The list of CMSMS admin UIDs

Returns

string[]

get_uid_email()

get_uid_email(int $uid) : string

Get the email address (if any) for the specified uid If no uid is specified, use the currently logged in admin uid

Parameters

int $uid

The desired CMSMS admin user id. If no userid is provided, the currently logged in admin user account (if any) is used.

Returns

string

get_admin_membergroups()

get_admin_membergroups(int $uid) : int[]

Given an admin Userid get his member groups (if any)

Parameters

int $uid

The admin userid

Returns

int[] —

Array of integer groups, or null.

get_userlist()

get_userlist(int[] $uid_list) : array

Given an array of userids, get a hash of uids and usernames suitable for use in a dropdown.

Parameters

int[] $uid_list

Returns

array