src/CatLab/Accounts/Module.php
public function postLogin (Request $request, \Neuron\Interfaces\Models\User $user, $registered = false)
    {
        $parameters = array();
        if ($registered) {
            $parameters['registered'] = 1;
        }

        // Also set in session... why wouldn't this be in session? :D
        $request->getSession()->set('userJustRegistered', $registered);

        $this->trigger('user:login', [
            'request' => $request,
            'user' => $user,
            'registered' => $registered
        ]);

        // Should skip welcome screen?
        if ($request->getSession()->get('skip-welcome-redirect')) {
            $redirectUrl = $this->getAndClearPostLoginRedirect($request);
            return Response::redirect($redirectUrl);
        }

        return $this->redirectToWelcome ([]);
    }
public function postLogin (Request $request, \Neuron\Interfaces\Models\User $user, $registered = false)
    {
        $parameters = array();
        if ($registered) {
            $parameters['registered'] = 1;
        }

        // Also set in session... why wouldn't this be in session? :D
        $request->getSession()->set('userJustRegistered', $registered);

        $this->trigger('user:login', [
            'request' => $request,
            'user' => $user,
            'registered' => $registered
        ]);

        // Should skip welcome screen?
        if ($request->getSession()->get('skip-welcome-redirect')) {
            $redirectUrl = $this->getAndClearPostLoginRedirect($request);
            return Response::redirect($redirectUrl);
        }

        return $this->redirectToWelcome ([]);
    }
public function postLogin ( Request $ request , \ Neuron \ Interfaces \ Models \ User $ user , $ registered = false ) { $ parameters = array ( ) ; if ( $ registered ) { $ parameters [ 'registered' ] = 1 ; } // Also set in session... why wouldn't this be in session? :D $ request -> getSession ( ) -> set ( 'userJustRegistered' , $ registered ) ; $ this -> trigger ( 'user:login' , [ 'request' => $ request , 'user' => $ user , 'registered' => $ registered ] ) ; // Should skip welcome screen? if ( $ request -> getSession ( ) -> get ( 'skip-welcome-redirect' ) ) { $ redirectUrl = $ this -> getAndClearPostLoginRedirect ( $ request ) ; return Response :: redirect ( $ redirectUrl ) ; } return $ this -> redirectToWelcome ( [ ] ) ; }
Called right after a user is logged in.
Should be a redirect.
@param Request $request
@param \Neuron\Interfaces\Models\User $user
@param boolean $registered
@return \Neuron\Net\Response
@throws DataNotSet
Called right after a user is logged in . Should be a redirect .