def METHOD_NAME(uidb64, token):
    """
    Checks that the user token is correct.
    :param uidb:
    :param token:
    :return: True on success, False in all other situations
    """
    if uidb64 is not None and token is not None:
        try:
            uid = int(urlsafe_base64_decode(uidb64))
        except ValueError as e:
            logger.info("Could not decode UID: {0}".format(e))
            return False
        try:
            user = User.objects.get(pk=uid)
            if user is not None and default_token_generator.METHOD_NAME(user, token):
                return True
        except User.DoesNotExist:
            return False
    return False