Allow $user_id to be null