19 declare(strict_types=1);
29 private \ILIAS\DI\RBACServices
$rbac;
35 $this->
rbac = $DIC->rbac();
36 $this->ref_id = $a_ref_id;
52 $role_list = $this->
rbac->review()->getRoleListByObject($this->
getRefId());
53 foreach ($role_list as $role) {
54 if (strpos($role[
'title'],
'il_frm_moderator') !==
false) {
55 $a_rol_id = (
int) $role[
'obj_id'];
60 if ($a_rol_id !== null) {
61 $this->
rbac->admin()->assignUser($a_rol_id, $a_usr_id);
71 $role_list = $this->
rbac->review()->getRoleListByObject($this->
getRefId());
72 foreach ($role_list as $role) {
73 if (strpos($role[
'title'],
'il_frm_moderator') !==
false) {
74 $a_rol_id = (
int) $role[
'obj_id'];
79 if ($a_rol_id !== null) {
80 $this->
rbac->admin()->deassignUser($a_rol_id, $a_usr_id);
93 $roles = $this->
rbac->review()->getRoleListByObject($this->
getRefId());
94 foreach ($roles as $role) {
95 if (strpos($role[
'title'],
'il_frm_moderator') !==
false) {
96 $assigned_users = $this->
rbac->review()->assignedUsers((
int) $role[
'rol_id']);
101 return $assigned_users;
109 $assigned_users = [];
110 $roles = $this->
rbac->review()->getRoleListByObject($this->
getRefId());
111 foreach ($roles as $role) {
112 if (strpos($role[
'title'],
'il_frm_moderator') !==
false) {
113 $assigned_users = array_map(
'intval', $this->
rbac->review()->assignedUsers((
int) $role[
'rol_id']));
118 return $assigned_users;
addModeratorRole(int $a_usr_id)
ILIAS DI RBACServices $rbac
detachModeratorRole(int $a_usr_id)
__construct(int $a_ref_id)