在php文件中执行IF-xor-ELSE语句时,如何检查phpBB2中的特定用户ID

在php文件中执行IF-xor-ELSE语句时,如何检查phpBB2中的特定用户ID,php,privileges,phpbb,Php,Privileges,Phpbb,我有一个phpBB2论坛,它有一个基于PHP文件运行的集成包。在其中一个文件中,可以访问特定页面的用户的权限通过以下方式确定: // only mods and admins will be able to see this control panel. if ($userdata['user_level'] < ADMIN) //message_die(GENERAL_ERROR,'No permission. If you are looking for the cla

我有一个phpBB2论坛,它有一个基于PHP文件运行的集成包。在其中一个文件中,可以访问特定页面的用户的权限通过以下方式确定:

// only mods and admins will be able to see this control panel.
    if ($userdata['user_level'] < ADMIN)
    //message_die(GENERAL_ERROR,'No permission. If you are looking for the claims browser, it has been integrated into the forums.');
}
else
{
    $mod_privileges = true;
    $template->assign_block_vars("is_auth", array());
    #$template->assign_block_vars("is_auth2", array());
}
//只有MOD和管理员才能看到此控制面板。
if($userdata['user_level']assign_block_vars(“is_auth”,array());
#$template->assign_block_vars(“is_auth2”,array());
}
我正在寻找一种方法,在这个PHP文件中为论坛上的特定用户添加权限(通过其帐户的用户ID标识,例如9000),而不给他管理员或全局版主在我们phpBB论坛上的访问级别

适当的改变是这样的吗

// only mods and admins will be able to see this control panel.
if ($userdata['user_level'] < ADMIN) xor (&phpbb_user_id!==['9000'])
{
    //message_die(GENERAL_ERROR,'No permission. If you are looking for the claims browser, it has been integrated into the forums.');
}
//只有MOD和管理员才能看到此控制面板。
if($userdata['user\u level']
您的情况将是

if ($userdata['user_level'] < ADMIN) || ($phpbb_user_id!=='9000') {

}
if($userdata['user_level']
我相信我已经找到了答案:

if ($userdata['user_id'] != 9000 && $userdata['user_level'] < ADMIN)
if($userdata['user\u id']!=9000&$userdata['user\u level']
这正是我们想要的