Forums de discussion

UserPasswordException on updatePasswordWithUserId

thumbnail
Genar Codina, modifié il y a 7 années.

UserPasswordException on updatePasswordWithUserId

Junior Member Publications: 28 Date d'inscription: 18/04/16 Publications récentes
When I try to update the password using the method:

- (NSDictionary *)updatePasswordWithUserId:(long long)userId password1:(NSString *)password1 password2:(NSString *)password2 passwordReset:(BOOL)passwordReset error:(NSError **)error;

I get a
com.liferay.portal.UserPasswordException


I suppose that:

1) password1 is the old password
2) password2 is the new password
3) passwordReset: I use always "true" (I think that it means: "change the password immediately").

However, I cannot complete successfully the function call because I get the error:

java.lang.SecurityException

Any suggestion will be appreciated.

Thanks in advance.
thumbnail
Javier Gamarra, modifié il y a 7 années.

RE: UserPasswordException on updatePasswordWithUserId (Réponse)

Expert Publications: 348 Date d'inscription: 12/02/15 Publications récentes
You need a valid session (with an user and password) to be able to make the call, the error seems to imply that the user and password (of the session) are invalid.
thumbnail
Genar Codina, modifié il y a 7 années.

RE: UserPasswordException on updatePasswordWithUserId

Junior Member Publications: 28 Date d'inscription: 18/04/16 Publications récentes
Hi Javier,

You were totally right about using a valid session.

Thanks