Fórumok

Notify administrator when a user is deleted by another admin

Khuong Nguyen, módosítva 9 év-val korábban

Notify administrator when a user is deleted by another admin

New Member Bejegyzések: 4 Csatlakozás dátuma: 2015.01.14. Legújabb bejegyzések
Hi all, I am implement a function in liferay which is allow sending a notification when an admin deactivate a user. I try to research workflow in kaleo but it does not help. Anyone know about this, please tell me. Thanks in advance
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Notify administrator when a user is deleted by another admin

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Use a ModelListener on the User class, check for change in status, email when changing.

Alternatively you could pay for EE and use the Audit plugin; this will give you a history of who did what to the users.
Khuong Nguyen, módosítva 9 év-val korábban

RE: Notify administrator when a user is deleted by another admin

New Member Bejegyzések: 4 Csatlakozás dátuma: 2015.01.14. Legújabb bejegyzések
David H Nebinger:
Use a ModelListener on the User class, check for change in status, email when changing.

Alternatively you could pay for EE and use the Audit plugin; this will give you a history of who did what to the users.


Thanks for your reply. Can you give more detail about using ModelListener, I am newbie in Liferay. Moreover, how can I override User class of Liferay, I can not find the class definition in my project?
thumbnail
Krzysztof Gołębiowski, módosítva 9 év-val korábban

RE: Notify administrator when a user is deleted by another admin

Liferay Master Bejegyzések: 549 Csatlakozás dátuma: 2011.06.25. Legújabb bejegyzések
Hello Khuong,
Model listeners is quite a simple mechanism and has been well described on the network, check these two article for example:

If you receive an update event, you could check if the user gets deactivated and then send email using Liferay services (check http://liferaytutorial.blogspot.in/2013/08/sending-mail-in-liferay.html).

I think you cannot use workflow in this case as it is triggered only when user is registered for the first time.

Regards,
KG