Hi,
I wrote a custom Liferay Authentication Module which authenticates a user against my own Backend-DB.
If the login is successful it creates the user in Liferay (if it doesn't already exists in Liferay DB ). For the case the user already exists in Liferay DB I perform an update of the Liferay User instead via calling UserLocalServiceUtil.updateUser(User user).
Here the relevant Code-Snippet:
//Use Case: User already exists in Liferay
//get current Liferay user
User user = UserLocalServiceUtil.getUserByScreenName(companyId,screenName);
//set new user credentials
user.setFirstName(newFirstName);
user.setLastName(newLastName);
user.setEmailAddress(newEmailAddress);
//Update user in Liferay
UserLocalServiceUtil.updateUser(user);
Unfortunately after the user update the changes are not visible in the "My Account"-Portlet. There I see the old values (values before update).
However if I read out the user programmatically via
"UserLocalServiceUtil.getUserByScreenName(companyId,screenName)" I get the updated values.
Any suggestions about the cause of this behavior?
Thx a lot in advance.
Please sign in to flag this as inappropriate.