src/logic/Impersonator.php
public function unimpersonateUser()
    {
        $realId = $this->session->remove('__realId');
        if ($realId !== null) {
            $this->user->identity->remove();
            $this->session->set($this->user->idParam, $realId);
            $identity = User::findOne($realId);
            $this->user->setIdentity($identity);
            $this->restoreBackedUpToken();
        }
    }
public function unimpersonateUser()
    {
        $realId = $this->session->remove('__realId');
        if ($realId !== null) {
            $this->user->identity->remove();
            $this->session->set($this->user->idParam, $realId);
            $identity = User::findOne($realId);
            $this->user->setIdentity($identity);
            $this->restoreBackedUpToken();
        }
    }
public function unimpersonateUser ( ) { $ realId = $ this -> session -> remove ( '__realId' ) ; if ( $ realId !== null ) { $ this -> user -> identity -> remove ( ) ; $ this -> session -> set ( $ this -> user -> idParam , $ realId ) ; $ identity = User :: findOne ( $ realId ) ; $ this -> user -> setIdentity ( $ identity ) ; $ this -> restoreBackedUpToken ( ) ; } }
Method should be called when user should be unimpersonated.
Method should be called when user should be unimpersonated .