public function getUserFromToken($token)
    {
        $expiration = U::unixToDb(time() - UserLink::$forgotLinkTimeframe);
        $link = UserLink::where('link', $token)
            ->where('type', UserLink::FORGOT_PASSWORD)
            ->where('created_at', $expiration, '>')
            ->first();

        if (!$link) {
            throw new AuthException('This link has expired or is invalid.');
        }

        $userClass = $this->auth->getUserClass();

        return $userClass::find($link->user_id);
    }
public function getUserFromToken($token)
    {
        $expiration = U::unixToDb(time() - UserLink::$forgotLinkTimeframe);
        $link = UserLink::where('link', $token)
            ->where('type', UserLink::FORGOT_PASSWORD)
            ->where('created_at', $expiration, '>')
            ->first();

        if (!$link) {
            throw new AuthException('This link has expired or is invalid.');
        }

        $userClass = $this->auth->getUserClass();

        return $userClass::find($link->user_id);
    }
public function getUserFromToken ( $ token ) { $ expiration = U :: unixToDb ( time ( ) - UserLink :: $ forgotLinkTimeframe ) ; $ link = UserLink :: where ( 'link' , $ token ) -> where ( 'type' , UserLink :: FORGOT_PASSWORD ) -> where ( 'created_at' , $ expiration , '>' ) -> first ( ) ; if ( ! $ link ) { throw new AuthException ( 'This link has expired or is invalid.' ) ; } $ userClass = $ this -> auth -> getUserClass ( ) ; return $ userClass :: find ( $ link -> user_id ) ; }
Looks up a user from a given forgot token.

@param string $token

@throws AuthException when the token is invalid.

@return \Infuse\Auth\Interfaces\UserInterface
Looks up a user from a given forgot token .