Forums de discussion

Reset Password and Login User

thumbnail
Eckbert Peter Dollhofer, modifié il y a 12 années.

Reset Password and Login User

New Member Publications: 4 Date d'inscription: 12/08/09 Publications récentes
Hi,

I have some users added by an import into liferay and added them to special role.
The first time those Users try to register there is a check if the email adress already exists. If this is true my code checks if the user has the special role.
If yes, the password should be resetet and an email should be sent to the user just like they really did register.
Now I was trying to use the code from ForgotPasswordAction.java to do an Reset and send a mail, but it won't work.

There is a Method LoginUtil.sendPassword(actionRequest, emailFromName, emailFromAddress, emailToAddress,subject, body);

where in my case the body remains null, where i guess the password should be inside.
So what I'am looking for is - how to reset the password of a user and send it by mail.

Cheers,
Ecki
thumbnail
Rojalin Patri, modifié il y a 12 années.

RE: Reset Password and Login User

Expert Publications: 287 Date d'inscription: 22/03/11 Publications récentes
Hi Peter,
i am not sure whether u have already set the value for the "body" used in the function LoginUtil.sendPassword(),but the value for the "body" is taken from prefrences and the "emailPasswordSentBody_" is there in ConfigurationActionImpl.java.May be it'll help you once you go through both the java files.