Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Liferay - customise change password

Tags:

liferay

I would like to customise Liferay 6.0.6 mechanizm for update password.

In our project we decided to manage users' on our own, so we keep all data like usernames and passwords in our database. We don't want to use the Liferay's database but it seems that Liferay is maintaining it for itself and uses it anyway. In result we have user's password in two places and we have to care for data synchonization.

Customising authentication mechanizm was easy - with auth.pipeline in portal-ext.property.

Now I'd like to call my custom method, when user is changing their password by MyAccount portlet. I need to catch both current and new password typed by user in portlet.

I don't see any portal property for update password event. I've tried to write a hook plugin customising UserLocalService, but with no success so far. Is it possible at all to do this with a hook?

Any help would be appreciated. Thanks in advance.

like image 814
stal Avatar asked Jan 09 '12 16:01

stal


People also ask

How do I customize my Liferay page?

Enabling Page CustomizationsClick Configure Page from the Options button next to the Page you want to let Site members modify. Select the Advanced tab at the top of the page and expand the Customization Settings area. Click the Customizable selector button to activate customizations.


2 Answers

I found that the action I was looking for is com.liferay.portlet.myaccount.action.EditUserAction and as a struts action it can be customised using ext plugin (since Liferay 6.1 also even using hook plugin). Liferay-plugins-sdk can be used to create deployable plugin but you can also edit config files (in this case struts-config-ext.xml) directly on liferay. Hope this could be useful for some of you.

like image 103
stal Avatar answered Oct 20 '22 07:10

stal


if you just need to change password by user id, look there - change password by user ID (set new pass, confirm, and password reset boolean)

(updaterUser didn't work for me)

like image 1
xxxvodnikxxx Avatar answered Oct 20 '22 07:10

xxxvodnikxxx