PHP 파일을 기반으로 실행되는 통합 패키지가 포함 된 phpBB2 포럼이 있습니다. 이러한 파일 중 하나에서, 특정 페이지에 액세스 할 수있는 사용자에 대한 권한이 방법으로 결정됩니다PHP 파일에서 IFxor ELSE 문을 실행할 때 phpBB2의 특정 사용자 ID를 확인하는 방법
// 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());
}
그리고 나는 우리의 포럼에서 특정 사용자에 대한 권한을 추가하는 방법을 찾고 있어요 (자신의 계정의 사용자 식별 ID, 우리는 예를 들어 9000을 말할 것입니다.) phpBB 포럼에서 관리자 또는 Global Moderator에 대한 액세스 수준을 부여하지 않고이 PHP 파일에서
적절한 변경이 이와 유사할까요?
if ($userdata['user_id'] != 9000 && $userdata['user_level'] < ADMIN)
의도 한대로이 작동 :
// 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.');
}