def _check_user(config, user):
    """Check if *user* is in *config*.  Raise a :exc:`ValueError` if not."""
    if user not in config['users']:
        raise ValueError('User "%s" does not exist.' % user)
