mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
9da9f1237d
commit
3f66bd7437
@ -5,6 +5,7 @@ namespace Icinga\Authentication;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Icinga\Application\Config;
|
use Icinga\Application\Config;
|
||||||
|
use Icinga\Application\Hook\AuditHook;
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Authentication\User\ExternalBackend;
|
use Icinga\Authentication\User\ExternalBackend;
|
||||||
@ -164,6 +165,7 @@ class Auth
|
|||||||
if ($persist) {
|
if ($persist) {
|
||||||
$this->persistCurrentUser();
|
$this->persistCurrentUser();
|
||||||
}
|
}
|
||||||
|
AuditHook::logActivity('login', 'User {{username}} logged in', ['username' => $user->getUsername()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -362,6 +364,7 @@ class Auth
|
|||||||
*/
|
*/
|
||||||
public function removeAuthorization()
|
public function removeAuthorization()
|
||||||
{
|
{
|
||||||
|
AuditHook::logActivity('logout', 'User {{username}} logged out', ['username' => $this->user->getUsername()]);
|
||||||
$this->user = null;
|
$this->user = null;
|
||||||
Session::getSession()->purge();
|
Session::getSession()->purge();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user