Fixed issue when confirmation email is disabled when registering a user.