function opigno_messaging_user_is_manager in Opigno messaging 8
Same name and namespace in other branches
- 3.x opigno_messaging.module \opigno_messaging_user_is_manager()
Checks the member roles is an manager.
Parameters
\Drupal\group\GroupMembership[] $member_roles: Group member roles.
Return value
bool User membership is manager.
2 calls to opigno_messaging_user_is_manager()
- opigno_messaging_get_all_recipients in ./
opigno_messaging.module - Helper function to get list of all users that current user can message to.
- opigno_messaging_get_user_for_group in ./
opigno_messaging.module - Helper function to get users for group.
File
- ./
opigno_messaging.module, line 206 - Contains opigno_messaging.module.
Code
function opigno_messaging_user_is_manager($member_roles) {
return count(array_intersect(array_keys($member_roles), [
'learning_path-user_manager',
'opigno_class-class_manager',
])) > 0;
}