mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
fix self enable switch
This commit is contained in:
@@ -1506,8 +1506,9 @@ function get_user_from_cookie(array $cookie, $isArray = true): array|\App\Models
|
||||
$signature = $result['signature'];
|
||||
$log .= ", uid = $id";
|
||||
$isAjax = nexus()->isAjax();
|
||||
//only in nexus web can self-enable
|
||||
$shouldIgnoreEnabled = IN_NEXUS && !$isAjax;
|
||||
$selfEnableBonus = \App\Models\Setting::getSelfEnableBonus();
|
||||
//only in nexus web can self-enable, and require bonus > 0
|
||||
$shouldIgnoreEnabled = IN_NEXUS && !$isAjax && $selfEnableBonus > 0;
|
||||
if ($isArray) {
|
||||
$whereStr = sprintf("id = %d and status = 'confirmed'", $id);
|
||||
if (!$shouldIgnoreEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user