Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to get the correct user status from Liferay DXP 7.3
Hi there,
We are on Liferay DXP 7.3.10. As requested by our customers, we provide them with monthly status reports of the users (name, id, inactive/active, access rights, last login date/time etc) from their respective organizations.
In DXP 7.3.10 database, there is a column named status in table User_. Based on our experiments, it seems to us that when its status is set to 5, a user will be inactive, otherwise, when set to 0, the user will be active. This seems true for most user records. But we do have found some exceptions. While the users' status were 0 in the table, their status on Liferay Portal's adminstration / control panel / users and organizations UI were shown as inactive and this has confused our customers as the generated reports showed them those users were active.
Can someone please help and let me know how Liferay populates the user status on its admin UI? Does it solely rely on the value of User_.status column? When generating the user status reports, we will need to use the same logic to make the status of all users consistent with those displayed on the admin UI.
Thank you in advance!
Eric
Hi Eric, I've never looked at this before but it seems pretty straightforward. The MVCActionCommand sets the status to INACTIVE (int 5) when a user is deactivated, and APPROVED (int 0) when restored. I can't think of a reason why there'd be a mismatch, but I don't know how you're retrieving the data. Maybe something with the search index? A Reindex might be in order?
Powered by Liferay™