def _get_user(request, user_incoming, email_incoming):
    """Pull out and return the user's ID and email from a given request,
    or (None, '') if the request is None.
    """
    if request:
        user_id = user_incoming if user_incoming else request.user.id
        user_email = email_incoming if email_incoming else request.user.email
    else:
        user_id = user_incoming
        user_email = email_incoming
    return user_id, user_email
