Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
Davide N. P. Rossi
(Solved) Export all users also non active ones in Liferay 6.x
30 de mayo de 2012 2:55
Respuesta

Davide N. P. Rossi

Ranking: Junior Member

Mensajes: 55

Fecha de incorporación: 3 de julio de 2010

Mensajes recientes

Hi to all,
We put up a school ex student site "Alumni site" that has a user base well over 8000 users most of these are deactivated until we receive a registration request and if present in the user base then they get activated.
We are trying to "Export All Users" but only the active users are exported to csv. Extending user search status to ANY STATUS does find all 8000 users but these are not exported.
Is there a way to solve this via hooks???
Thank you....

Edited:

Even though still not a java pro I solved this myself changing one line of code to just a few if, ifelse statements.

Changed line 143 in
/portal_impl/src/com/liferay/portlet/useradmin/action/ExportUsersAction.java


From:
1searchTerms.setStatus(WorkflowConstants.STATUS_APPROVED);


To:
 1int userStatus = searchTerms.getStatus();
 2       
 3if (userStatus == WorkflowConstants.STATUS_ANY) {
 4    searchTerms.setStatus(WorkflowConstants.STATUS_ANY);
 5}
 6else if (userStatus == WorkflowConstants.STATUS_INACTIVE) {
 7    searchTerms.setStatus(WorkflowConstants.STATUS_INACTIVE);
 8}
 9else if (userStatus == WorkflowConstants.STATUS_APPROVED) {
10    searchTerms.setStatus(WorkflowConstants.STATUS_APPROVED);
11}


Now works perfectly selecting advanced search Satus: *Any Status, Active and Inactive*

*Any Status* will return a csv export with All users
*Active* will return a csv export with all Active users
*Inactive* will return a csv export with all Inactive users.

Hope someone will fix this in gits 6.1.x and 6.2.x

Cheers!

Reported as an issue 23/Apr/12 3:01 PM
PUBLIC - Liferay Portal Community Edition
LPS-26910