GUACAMOLE-1149: Refresh model of current user after automatic account creation.

The proper database IDs must be populated in the current user's
ModeledUser for other parts of the database extension to work
correctly, including saving of user attributes.
This commit is contained in:
Michael Jumper
2020-08-20 22:01:54 -07:00
parent cb50cea104
commit b07356164c

View File

@@ -133,7 +133,8 @@ public class JDBCAuthenticationProviderService implements AuthenticationProvider
// If auto account creation is enabled, add user to DB.
if (environment.autoCreateAbsentAccounts()) {
userService.createObject(new PrivilegedModeledAuthenticatedUser(user.getCurrentUser()), user);
ModeledUser createdUser = userService.createObject(new PrivilegedModeledAuthenticatedUser(user.getCurrentUser()), user);
user.setModel(createdUser.getModel());
}
}