[ticket/291] Add get_disallowed_forums() method to helper

B3P-291
This commit is contained in:
Marc Alexander
2014-07-07 14:05:06 +02:00
parent b9a6a3b3e5
commit 0ae979e34a
3 changed files with 115 additions and 0 deletions

View File

@@ -72,4 +72,24 @@ class helper
return false;
}
}
/**
* Get an array of disallowed forums
*
* @param bool $disallow_access Whether the array for disallowing access
* should be filled
*/
public function get_disallowed_forums($disallow_access)
{
if ($disallow_access == true)
{
$disallow_access = array_unique(array_keys($this->auth->acl_getf('!f_read', true)));
}
else
{
$disallow_access = array();
}
return $disallow_access;
}
}