Search the FirstSpirit Knowledge Base
Hello there
Is there a way to conveniently export the current list of registered users within a FirstSpirit Installation? Preferably with extended variables like Registration Date, Active = yes/no, Used Email Address etc.
If there is no easy way, can someone tell me another efficient way to do so? I've tried using the users.xml file which is contained on the machine, but there seems to be no easy way to convert it to an easy-to-read excel table.
Hello dhelmstetter,
I would use a script. For example like this:
Create a Server Schedule Entry (ServerManager=>Server/Properties=>Schedule management=>new entry with script action) and as script content e.g.:
import de.espirit.firstspirit.access.AdminService;
import de.espirit.firstspirit.access.ServicesBroker;
broker = context.getConnection().getBroker();
adminService = context.requireSpecialist(ServicesBroker.TYPE).getService(AdminService.class);
allUsers = adminService.getUserStorage().getUsers();
for (user:allUsers) {
context.logInfo("Login:" + user.getLoginName() + " /UserName: " + user.getName() + " /eMail: " + user.getEMail() + " /isActive:" + user.isActive());
}
If it is needed more than once, it would make sense to create a csv file instead of the output in the log 😉
Best regards,
Holger
Hello dhelmstetter,
I would use a script. For example like this:
Create a Server Schedule Entry (ServerManager=>Server/Properties=>Schedule management=>new entry with script action) and as script content e.g.:
import de.espirit.firstspirit.access.AdminService;
import de.espirit.firstspirit.access.ServicesBroker;
broker = context.getConnection().getBroker();
adminService = context.requireSpecialist(ServicesBroker.TYPE).getService(AdminService.class);
allUsers = adminService.getUserStorage().getUsers();
for (user:allUsers) {
context.logInfo("Login:" + user.getLoginName() + " /UserName: " + user.getName() + " /eMail: " + user.getEMail() + " /isActive:" + user.isActive());
}
If it is needed more than once, it would make sense to create a csv file instead of the output in the log 😉
Best regards,
Holger
Hello! Many thanks for the script. I tweaked it a little so it meets our expectations, but overall it worked just fine!