public ManagedUser updateManagedUser ( final ManagedUser transientUser ) { final ManagedUser user = getObjectById ( ManagedUser . class , transientUser . getId ( ) ) ; pm . currentTransaction ( ) . begin ( ) ; user . setFullname ( transientUser . getFullname ( ) ) ; user . setEmail ( transientUser . getEmail ( ) ) ; user . setForcePasswordChange ( transientUser . isForcePasswordChange ( ) ) ; user . setNonExpiryPassword ( transientUser . isNonExpiryPassword ( ) ) ; user . setSuspended ( transientUser . isSuspended ( ) ) ; if ( transientUser . getPassword ( ) != null ) { if ( ! user . getPassword ( ) . equals ( transientUser . getPassword ( ) ) ) { user . setLastPasswordChange ( new Date ( ) ) ; } user . setPassword ( transientUser . getPassword ( ) ) ; } pm . currentTransaction ( ) . commit ( ) ; return pm . getObjectById ( ManagedUser . class , user . getId ( ) ) ; }
Updates the specified ManagedUser .