Class ilForumModerators.
More...
Detailed Description
Constructor & Destructor Documentation
ilForumModerators::__construct |
( |
|
$a_ref_id | ) |
|
Member Function Documentation
ilForumModerators::addModeratorRole |
( |
|
$a_usr_id | ) |
|
Definition at line 24 of file class.ilForumModerators.php.
{
global $rbacreview, $rbacadmin;
$role_folder_id = $rbacreview->getRoleFolderIdOfObject($this->ref_id);
$role_list = $rbacreview->getRoleListByObject($role_folder_id);
foreach ($role_list as $role)
{
if(strpos($role['title'], 'il_frm_moderator') !== false)
{
$a_rol_id = $role['obj_id'];
break;
}
}
if((int)$a_rol_id)
{
$user = $rbacadmin->assignUser($a_rol_id, $a_usr_id);
return true;
}
return false;
}
ilForumModerators::detachModeratorRole |
( |
|
$a_usr_id | ) |
|
Definition at line 48 of file class.ilForumModerators.php.
{
global $rbacreview, $rbacadmin;
$role_folder_id = $rbacreview->getRoleFolderIdOfObject($this->ref_id);
$role_list = $rbacreview->getRoleListByObject($role_folder_id);
foreach ($role_list as $role)
{
if(strpos($role['title'], 'il_frm_moderator') !== false)
{
$a_rol_id = $role['obj_id'];
break;
}
}
if((int)$a_rol_id)
{
$user = $rbacadmin->deassignUser($a_rol_id, $a_usr_id);
return true;
}
return false;
}
ilForumModerators::getCurrentModerators |
( |
| ) |
|
Definition at line 72 of file class.ilForumModerators.php.
{
global $rbacreview;
$role_folder = $rbacreview->getRoleFolderOfObject($this->ref_id);
$roles = $rbacreview->getRoleListByObject($role_folder['child']);
foreach($roles as $role)
{
if(strpos($role['title'], 'il_frm_moderator') !== false)
{
$assigned_users = $rbacreview->assignedUsers($role['rol_id']);
break;
}
}
return is_array($assigned_users) ? $assigned_users : array();
}
ilForumModerators::getUsers |
( |
| ) |
|
Definition at line 90 of file class.ilForumModerators.php.
{
global $rbacreview;
$role_folder = $rbacreview->getRoleFolderOfObject($this->ref_id);
$roles = $rbacreview->getRoleListByObject($role_folder['child']);
foreach($roles as $role)
{
if(strpos($role['title'], 'il_frm_moderator') !== false)
{
$assigned_users = $rbacreview->assignedUsers($role['rol_id']);
break;
}
}
return is_array($assigned_users) ? $assigned_users : array();
}
Field Documentation
ilForumModerators::$db = null |
|
private |
ilForumModerators::$ref_id = 0 |
|
private |
The documentation for this class was generated from the following file: