src/controllers/SiteController.php
private function login(Identity $identity, $sessionDuration = 0): bool
    {
        $returnUrl = $this->user->getReturnUrl();

        $result = $this->user->login($identity, $sessionDuration ? null : 0);
        if ($result && $returnUrl !== null) {
            $this->user->setReturnUrl($returnUrl);
        }

        return $result;
    }
private function login(Identity $identity, $sessionDuration = 0): bool
    {
        $returnUrl = $this->user->getReturnUrl();

        $result = $this->user->login($identity, $sessionDuration ? null : 0);
        if ($result && $returnUrl !== null) {
            $this->user->setReturnUrl($returnUrl);
        }

        return $result;
    }
private function login ( Identity $ identity , $ sessionDuration = 0 ) : bool { $ returnUrl = $ this -> user -> getReturnUrl ( ) ; $ result = $ this -> user -> login ( $ identity , $ sessionDuration ? null : 0 ) ; if ( $ result && $ returnUrl !== null ) { $ this -> user -> setReturnUrl ( $ returnUrl ) ; } return $ result ; }
Logs user in and preserves return URL.
Logs user in and preserves return URL .