Issue 5421: Autoenroll for already registered users
Issue 5421: Fixed indentation