Foros de discusión
Notify administrator when a user is deleted by another admin
Khuong Nguyen, modificado hace 9 años.
Notify administrator when a user is deleted by another admin
New Member Mensajes: 4 Fecha de incorporación: 14/01/15 Mensajes recientes
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
David H Nebinger, modificado hace 9 años.
RE: Notify administrator when a user is deleted by another admin
Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
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.
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, modificado hace 9 años.
RE: Notify administrator when a user is deleted by another admin
New Member Mensajes: 4 Fecha de incorporación: 14/01/15 Mensajes recientesDavid 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?
Krzysztof Gołębiowski, modificado hace 9 años.
RE: Notify administrator when a user is deleted by another admin
Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
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
Model listeners is quite a simple mechanism and has been well described on the network, check these two article for example:
- http://www.liferaysavvy.com/2014/05/liferay-model-listeners.html
- http://www.jayway.com/2010/08/25/the-long-and-winding-road-creating-a-model-listener-in-liferay-6/
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