1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00
git-svn-id: file:///svn/phpbb/trunk@6275 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-08-12 15:10:43 +00:00
parent ef71892edd
commit f5cabf864c
17 changed files with 44 additions and 62 deletions

View File

@@ -14,6 +14,12 @@
class acp_users
{
var $u_action;
var $p_master;
function acp_users(&$p_master)
{
$this->p_master = &$p_master;
}
function main($id, $mode)
{
@@ -114,7 +120,7 @@ class acp_users
foreach ($forms_ary['modes'] as $value => $ary)
{
if (!$this->is_authed($ary['auth']))
if (!$this->p_master->module_auth($ary['auth']))
{
continue;
}
@@ -1996,26 +2002,6 @@ class acp_users
$var = ($data) ? $data : $user_row['user_options'];
return ($var & 1 << $user->keyoptions[$key]) ? true : false;
}
/**
* Check if user is allowed to call this user mode
*/
function is_authed($module_auth)
{
global $config, $auth;
$module_auth = trim($module_auth);
if (!$module_auth)
{
return true;
}
$is_auth = false;
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get("\\1"\\2)', 'true', '(int) $config["\\1"]'), $module_auth) . ');');
return $is_auth;
}
}
?>