# \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()
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
final

File
  lib/class.cge_userops.php
Package
  \CGExtensions
Class hierarchy
  \cge_userops

## Tags

todo |

## 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

#

static

## Tags

todo |

### 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

#

static

## Tags

todo |

### 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[]

#

static

## Tags

todo |

### 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[]

#

static

## Tags

todo |

### 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

#

static

## Tags

todo |

### 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.

#

static

## Tags

todo |

### class.cge_userops.php