concrete/src/User/Login/LoginService.php
public function login($username, $password)
    {
        /**
         * @todo Invert this so that the `new User` constructor login relies on this service
         */
        $className = $this->userClass;
        $user = new $className($username, $password);

        if ($user->isError()) {
            // Throw an appropriate acception matching the exceptional state
            $this->handleUserError($user->getError());
        }

        return $user;
    }
public function login($username, $password)
    {
        /**
         * @todo Invert this so that the `new User` constructor login relies on this service
         */
        $className = $this->userClass;
        $user = new $className($username, $password);

        if ($user->isError()) {
            // Throw an appropriate acception matching the exceptional state
            $this->handleUserError($user->getError());
        }

        return $user;
    }
public function login ( $ username , $ password ) { /**
         * @todo Invert this so that the `new User` constructor login relies on this service
         */ $ className = $ this -> userClass ; $ user = new $ className ( $ username , $ password ) ; if ( $ user -> isError ( ) ) { // Throw an appropriate acception matching the exceptional state $ this -> handleUserError ( $ user -> getError ( ) ) ; } return $ user ; }
Attempt login given a username and a password

@param string $username The username or email to attempt login with
@param string $password The plain text password to attempt login with

@return User The logged in user

@throws \Concrete\Core\User\Exception\NotActiveException If the user is inactive
@throws \Concrete\Core\User\Exception\InvalidCredentialsException If passed credentials don't seem valid
@throws \Concrete\Core\User\Exception\NotValidatedException If the user has not yet been validated
@throws \Concrete\Core\User\Exception\SessionExpiredException If the session immediately expires after login
Attempt login given a username and a password