Skip to content

Commit

Permalink
Update UserLogout.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic authored Nov 17, 2023
1 parent 926532d commit 13b527f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Services/Users/UserLogout.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,13 @@ public function process(): string
}
$user = User::query()->find($internalKey);
$username = '';
$sid = EvolutionCMS()->sid;
if (!is_null($user)) {
$user->refresh_token = '';
$user->access_token = '';
$user->valid_to = NULL;
$user->save();
$username = $_SESSION[$this->context . 'Shortname'];
if(is_null($username)) $username = '';
$sid = EvolutionCMS()->sid;
$username = $_SESSION[$this->context . 'Shortname'] ?? '';
if ($this->events) {
// invoke OnBeforeManagerLogout event
EvolutionCMS()->invokeEvent("OnBeforeUserLogout",
Expand Down

0 comments on commit 13b527f

Please sign in to comment.