Mail Archive Home | exoplatform List | May 2006 Index
| <-- Date Index --> | <-- Thread Index --> |
I've implemented a simple workaround waiting for bug fix.
You need to override the class
org.exoplatform.services.organization.hibernate.UserHandlerImpl
and rewrite the saveUser method as shown below.
The workaround simply saves the current user profile before update user infos
public void saveUser(final User user,
final boolean broadcast) throws Exception {
// due to a bug the profile is reset by eXo when user is saved
// so we get a copy and update it after user save
OrganizationService orgService = (OrganizationService) PortalContainer
.getComponent(OrganizationService.class);
UserProfileHandler uph = orgService.getUserProfileHandler();
UserProfile profile = uph.findUserProfileByName(user.getUserName());
super.saveUser(user, broadcast);
uph.saveUserProfile(profile, true);
}
> -----Messaggio originale-----
> Da: Davide Ficano [mailto:davide.ficano@xxxxxx]
> Inviato: venerdi 26 maggio 2006 12.16
> A: exoplatform@xxxxxxxxxxxxx
> Oggetto: [exoplatform] update user remove user profile
>
>
> I save some info using UserProfileHandler and all works fine.
> When I update user data (eg email, first name, last name) from exoadmin
> user management console
> the profile is cleared.
>
> Is this a bug?
>
> sincerely yours,
>
> davide
>
>
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.