diff --git a/app/library/Auth.php b/app/library/Auth.php index 7d343cb..80ea7bd 100644 --- a/app/library/Auth.php +++ b/app/library/Auth.php @@ -87,6 +87,12 @@ class Auth extends Injectable $this->eventsManager->fire('auth:onLogin', $this, 'System'); } + public function getImpersonator() + { + $id = $this->session->get(self::IMPERSONATOR_ID); + return $id !== null ? User::findFirst($id) : null; + } + /** * Impersonate a user *