Sentinel\Repositories\User\SentryUserRepository::validateResetCode PHP Method

validateResetCode() public method

Validate a password reset link
public validateResetCode ( $id, $code ) : Sentinel\DataTransferObjects\FailureResponse
$id
$code
return Sentinel\DataTransferObjects\FailureResponse
    public function validateResetCode($id, $code)
    {
        try {
            $user = $this->sentry->findUserById($id);
            if (!$user->checkResetPasswordCode($code)) {
                return new FailureResponse(trans('Sentinel::users.invalidreset'), ['user' => $user]);
            }
            return new SuccessResponse(null);
        } catch (UserNotFoundException $e) {
            $message = trans('Sentinel::sessions.invalid');
            return new ExceptionResponse($message);
        }
    }