This is an automated email from the ASF dual-hosted git repository.

gk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/turbine-archetypes.git

commit fef16e77ac510860465855b6069185a454b98f43
Author: Georg Kallidis <[email protected]>
AuthorDate: Fri Nov 14 14:57:18 2025 +0100

    Fix resetting of user data in FluxLogut (assuming unintendedly) by check in 
FluxUserAction update method
---
 .../main/java/flux/modules/actions/user/FluxUserAction.java  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/src/main/resources/archetype-resources/src/main/java/flux/modules/actions/user/FluxUserAction.java
 
b/src/main/resources/archetype-resources/src/main/java/flux/modules/actions/user/FluxUserAction.java
index 0a8afb7..594254e 100644
--- 
a/src/main/resources/archetype-resources/src/main/java/flux/modules/actions/user/FluxUserAction.java
+++ 
b/src/main/resources/archetype-resources/src/main/java/flux/modules/actions/user/FluxUserAction.java
@@ -134,6 +134,18 @@ public class FluxUserAction extends FluxAction
                                        
data.getParameters().setProperties(user);
                                        
user.setPassword(tmp_user.getPassword());
                                        security.saveUser(user);
+                                       
+                                       // check, if current user is updated, 
then update session user except the password.
+                                       // This is, because in FlixLogout when 
logging out
+                                       // security.saveUser(user); is called 
with the current user from the session 
+                                       // and the data would be resetted 
+                                       if (data.getUser().getName().equals( 
username )) {
+                                           log.info( "Updating: Update session 
user as well to not reset data after logout (except password)." );
+                                           User userFromSession = 
data.getUserFromSession();
+                                           
data.getParameters().setProperties(userFromSession);
+                                           
userFromSession.setPassword(tmp_user.getPassword());
+                                           data.setUser( userFromSession );
+                                       }
 
                                        // Test if Admin provided new password
                                        String password = 
data.getParameters().getString("password");

Reply via email to