امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
I have the following method:
PHP:
Read more
PHP:
کد:
public function actionToggleTrigger()
{
$this->assertPostOnly();
$visitor = \XF::visitor();
if (!$visitor->user_id) {
return $this->noPermission();
}
$profile = $visitor->Profile;
$current = $profile->custom_fields->ToggleTrigger ?? '0';
$new = $current === '1' ? '0' : '1';
$profile->custom_fields->ToggleTrigger = $new;
$profile->save()...
Read more
