src/CatLab/Accounts/Module.php
public function login (Request $request, User $user, $registration = false)
    {
        // Check for email validation
        if ($this->requiresEmailValidation()) {
            if (!$user->isEmailVerified()) {
                $request->getSession()->set ('catlab-non-verified-user-id', $user->getId());
                return Response::redirect(URLBuilder::getURL($this->routepath . '/notverified'));
            }
        }

        $request->getSession()->set('catlab-user-id', $user->getId());
        return $this->postLogin($request, $user, $registration);
    }
public function login (Request $request, User $user, $registration = false)
    {
        // Check for email validation
        if ($this->requiresEmailValidation()) {
            if (!$user->isEmailVerified()) {
                $request->getSession()->set ('catlab-non-verified-user-id', $user->getId());
                return Response::redirect(URLBuilder::getURL($this->routepath . '/notverified'));
            }
        }

        $request->getSession()->set('catlab-user-id', $user->getId());
        return $this->postLogin($request, $user, $registration);
    }
public function login ( Request $ request , User $ user , $ registration = false ) { // Check for email validation if ( $ this -> requiresEmailValidation ( ) ) { if ( ! $ user -> isEmailVerified ( ) ) { $ request -> getSession ( ) -> set ( 'catlab-non-verified-user-id' , $ user -> getId ( ) ) ; return Response :: redirect ( URLBuilder :: getURL ( $ this -> routepath . '/notverified' ) ) ; } } $ request -> getSession ( ) -> set ( 'catlab-user-id' , $ user -> getId ( ) ) ; return $ this -> postLogin ( $ request , $ user , $ registration ) ; }
Login a specific user
@param Request $request
@param User $user
@param bool $registration
@return \Neuron\Net\Response
@throws DataNotSet
Login a specific user