src/Actions/LoginAction.php
public function perform()
    {
        $userField = $this->option('user-field', 'username');
        $passwordField = $this->option('password-field', 'password');

        $user = $this->getUser($this->form->data($userField));

        if (!$user || !$user->login($this->form->data($passwordField))) {
            $this->fail(I18n::translate('uniform-login-error'), $userField);
        }
    }
public function perform()
    {
        $userField = $this->option('user-field', 'username');
        $passwordField = $this->option('password-field', 'password');

        $user = $this->getUser($this->form->data($userField));

        if (!$user || !$user->login($this->form->data($passwordField))) {
            $this->fail(I18n::translate('uniform-login-error'), $userField);
        }
    }
public function perform ( ) { $ userField = $ this -> option ( 'user-field' , 'username' ) ; $ passwordField = $ this -> option ( 'password-field' , 'password' ) ; $ user = $ this -> getUser ( $ this -> form -> data ( $ userField ) ) ; if ( ! $ user || ! $ user -> login ( $ this -> form -> data ( $ passwordField ) ) ) { $ this -> fail ( I18n :: translate ( 'uniform-login-error' ) , $ userField ) ; } }
Log in a user.
Log in a user .