留言板
Notify administrator when a user is deleted by another admin
Khuong Nguyen,修改在9 年前。
Notify administrator when a user is deleted by another admin
New Member 帖子: 4 加入日期: 15-1-14 最近的帖子
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,修改在9 年前。
RE: Notify administrator when a user is deleted by another admin
Liferay Legend 帖子: 14913 加入日期: 06-9-2 最近的帖子
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,修改在9 年前。
RE: Notify administrator when a user is deleted by another admin
New Member 帖子: 4 加入日期: 15-1-14 最近的帖子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?
Krzysztof Gołębiowski,修改在9 年前。
RE: Notify administrator when a user is deleted by another admin
Liferay Master 帖子: 549 加入日期: 11-6-25 最近的帖子
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