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

Combination View Flat View Tree View
Threads [ Previous | Next ]
Davide N. P. Rossi
(Solved) Export all users also non active ones in Liferay 6.x
May 30, 2012 2:55 AM

Davide N. P. Rossi

Rank: Junior Member

Posts: 55

Join Date: July 3, 2010

Recent Posts

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