public function findForPassport($identifier)
    {
        return (new static())->newQuery()->orWhere(function ($q) use ($identifier) {
            return $q->orWhere('email', $identifier)->orWhere('name', $identifier);
        })->where('enabled', 1)->first();
    }
public function findForPassport($identifier)
    {
        return (new static())->newQuery()->orWhere(function ($q) use ($identifier) {
            return $q->orWhere('email', $identifier)->orWhere('name', $identifier);
        })->where('enabled', 1)->first();
    }
public function findForPassport ( $ identifier ) { return ( new static ( ) ) -> newQuery ( ) -> orWhere ( function ( $ q ) use ( $ identifier ) { return $ q -> orWhere ( 'email' , $ identifier ) -> orWhere ( 'name' , $ identifier ) ; } ) -> where ( 'enabled' , 1 ) -> first ( ) ; }
Retrieve user for passport oauth.

@param string $identifier

@return User
Retrieve user for passport oauth .