Improve user directory
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / auth / UserAdminLoginModule.java
index 1d91a21ca4802e861671bc9ec0afd3c75ee89b36..68a08c5d95feb953a17b34e9080d83695fb6ca5d 100644 (file)
@@ -117,8 +117,10 @@ public class UserAdminLoginModule implements LoginModule {
                        AuthenticatingUser authenticatingUser = new AuthenticatingUser(user.getName(), password);
                        bindAuthorization = userAdmin.getAuthorization(authenticatingUser);
                        // TODO check tokens as well
-                       if (bindAuthorization != null)
+                       if (bindAuthorization != null) {
+                               authenticatedUser = user;
                                return true;
+                       }
                } catch (Exception e) {
                        // silent
                        if(log.isTraceEnabled())