Adapt activate_user_roles().