امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
If a non-moderator (or guest) attempts to access
PHP:
...
Read more
members/ban, it instead causes a server error.PHP:
کد:
public function canBan(&$error = null)
{
$visitor = \XF::visitor();
if (!$this->user_id || !$visitor->is_moderator || $this->user_id == $visitor->user_id)
{
return false;
}
...
public function userBanAddEdit(User $user)
{
if (!$user->canBan($error))
{
return $this->error($error);
}
Read more
