As I've said above, the ensure_user_* functions should trigger proper errors. Don't they?