- Issue created by @solideogloria
It is handled in
src/Masquerade.php
public function switchBack() { if (!$this->isMasquerading()) { return FALSE; } // Load previous user account. $user = $this->userStorage->load($this->getMasquerade()); if (!$user) { // Ensure the flag is cleared. $this->session->remove('masquerading'); // User could be canceled while masquerading. return FALSE; } $account = $this->switchUser($user); // Clear the masquerading flag after switching the user so that hook // implementations can differentiate this from a real logout/login. $this->session->getMetadataBag()->clearMasquerade(); $this->logger->info('User %username stopped masquerading as %old_username.', [ '%username' => $user->getDisplayName(), '%old_username' => $account->getDisplayName(), 'link' => $user->toLink($this->t('view'))->toString(), ]); return TRUE; }
Yes, but that event doesn't happen if a user logs out while masquerading, instead of clicking "unmasquerade".
- Assigned to rishabjasrotia
- Issue was unassigned.