Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Davide N. P. Rossi
(Solved) Export all users also non active ones in Liferay 6.x
30 maggio 2012 2.55

Davide N. P. Rossi

Punteggio: Junior Member

Messaggi: 55

Data di Iscrizione: 3 luglio 2010

Messaggi recenti

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....


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


 1int userStatus = searchTerms.getStatus();
 3if (userStatus == WorkflowConstants.STATUS_ANY) {
 4    searchTerms.setStatus(WorkflowConstants.STATUS_ANY);
 6else if (userStatus == WorkflowConstants.STATUS_INACTIVE) {
 7    searchTerms.setStatus(WorkflowConstants.STATUS_INACTIVE);
 9else if (userStatus == WorkflowConstants.STATUS_APPROVED) {
10    searchTerms.setStatus(WorkflowConstants.STATUS_APPROVED);

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


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