Skip to content

Commit

Permalink
Update TokenAuth.php
Browse files Browse the repository at this point in the history
  • Loading branch information
warcooft authored Aug 26, 2024
1 parent 3bbe65e commit a4d067a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Filters/TokenAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ public function before(RequestInterface $request, $arguments = null)
->setJSON(['message' => lang('Auth.badToken')]);
}

if (setting('Auth.recordActiveDate')) {
$authenticator->recordActiveDate();
}

// Block inactive users when Email Activation is enabled
$user = $authenticator->getUser();
if ($user !== null && ! $user->isActivated()) {
Expand All @@ -74,6 +70,10 @@ public function before(RequestInterface $request, $arguments = null)
->setStatusCode(Response::HTTP_FORBIDDEN)
->setJSON(['message' => lang('Auth.activationBlocked')]);
}

if (setting('Auth.recordActiveDate')) {
$authenticator->recordActiveDate();
}
}

/**
Expand Down

0 comments on commit a4d067a

Please sign in to comment.