diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManagementMaintenanceTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManagementMaintenanceTask.java
index e85b9a451b6ed1cbaf979287279c23d865efd67e..02d7a606ee1b719e74ccf097cf36888d33520914 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManagementMaintenanceTask.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManagementMaintenanceTask.java
@@ -27,6 +27,7 @@ import org.apache.log4j.Logger;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
+import ch.systemsx.cisd.authentication.IAuthenticationService;
 import ch.systemsx.cisd.authentication.Principal;
 import ch.systemsx.cisd.authentication.ldap.LDAPAuthenticationService;
 import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException;
@@ -206,7 +207,7 @@ public class UserManagementMaintenanceTask implements IMaintenanceTask
 
     protected LDAPAuthenticationService getLdapAuthenticationService()
     {
-        return (LDAPAuthenticationService) CommonServiceProvider.getApplicationContext().getBean("ldap-authentication-service");
+        return (LDAPAuthenticationService) CommonServiceProvider.tryToGetBean("ldap-authentication-service");
     }
 
     private UserManager createUserManager(UserManagerConfig config, Log4jSimpleLogger logger)
@@ -225,7 +226,8 @@ public class UserManagementMaintenanceTask implements IMaintenanceTask
 
     protected UserManager createUserManager(Log4jSimpleLogger logger)
     {
-        return new UserManager(ldapService, CommonServiceProvider.getApplicationServerApi(), shareIdsMappingFile, 
+        IAuthenticationService authenticationService = (IAuthenticationService) CommonServiceProvider.tryToGetBean("authentication-service");
+        return new UserManager(authenticationService, CommonServiceProvider.getApplicationServerApi(), shareIdsMappingFile, 
                 logger, SystemTimeProvider.SYSTEM_TIME_PROVIDER);
     }
 }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManager.java
index 11334b67d777a212346d790a59b9712f5208d38a..45b07dd62e963a173294d53d89be7e468c0c899d 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManager.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/UserManager.java
@@ -386,10 +386,11 @@ public class UserManager
         List<PersonUpdate> updates = new ArrayList<>();
         PersonSearchCriteria searchCriteria = new PersonSearchCriteria();
         PersonFetchOptions fetchOptions = new PersonFetchOptions();
+        fetchOptions.withRegistrator();
         List<Person> persons = service.searchPersons(sessionToken, searchCriteria, fetchOptions).getObjects();
         for (Person person : persons)
         {
-            if (person.isActive())
+            if (person.isActive() & person.getRegistrator() != null) // user 'system' has no registrator
             {
                 try
                 {