public function findByCredentials(array $credentials, $is_set_token = true, $length = 55) {
            $user = $this->userProvider->findByCredentials($credentials);

            if ($is_set_token) {
                $this->user = $user;
                $this->user->token_api = $this->user->getRandomString($length);
                $this->user->token_expired = strtotime(date('Y-m-d H:i:s', strtotime('+4 hour')));
                $this->user->save();
            }
            return $user;
        }
public function findByCredentials(array $credentials, $is_set_token = true, $length = 55) {
            $user = $this->userProvider->findByCredentials($credentials);

            if ($is_set_token) {
                $this->user = $user;
                $this->user->token_api = $this->user->getRandomString($length);
                $this->user->token_expired = strtotime(date('Y-m-d H:i:s', strtotime('+4 hour')));
                $this->user->save();
            }
            return $user;
        }
public function findByCredentials ( array $ credentials , $ is_set_token = true , $ length = 55 ) { $ user = $ this -> userProvider -> findByCredentials ( $ credentials ) ; if ( $ is_set_token ) { $ this -> user = $ user ; $ this -> user -> token_api = $ this -> user -> getRandomString ( $ length ) ; $ this -> user -> token_expired = strtotime ( date ( 'Y-m-d H:i:s' , strtotime ( '+4 hour' ) ) ) ; $ this -> user -> save ( ) ; } return $ user ; }
Customize function
Get user info by user account login
@param array $credentials user account
@return object user
@date 12/07/2018
@add S1TT
Customize function Get user info by user account login