Show group membership(s) in user-summary and user-list

This commit is contained in:
Manfred Hoffmann
2020-04-03 06:16:13 +02:00
committed by GitHub
parent 22939a21b4
commit 1cc0ac0713
37 changed files with 51 additions and 0 deletions

View File

@@ -109,6 +109,18 @@ class UserHelper extends Base
return $this->role->getRoleName($role ?: $this->userSession->getRole());
}
/**
* Get group names(as a comma-separated list) for a given user
*
* @access public
* @param integer $user_id User id
* @return string
*/
public function getGroupNames($user_id)
{
return implode(', ', array_column($this->groupMemberModel->getGroups($user_id), 'name'));
}
/**
* Check application access
*