Trying to disable user in other way

This commit is contained in:
Mauro Mugnaini 2021-01-11 16:01:29 +01:00
parent f52fea7103
commit ac83bfb261
1 changed files with 2 additions and 2 deletions

View File

@ -60,8 +60,8 @@ public class DeleteAccountResource {
logger.debug("Beginning the transaction on transaction manager");
session.getTransactionManager().begin();
logger.debug("Setting user as not enabled in realm");
user.setEnabled(false);
logger.debug("Finding user model and setting it as not enabled in realm");
session.users().getUserById(user.getId(), realm).setEnabled(false);
if (session.getTransactionManager().isActive()) {
logger.debug("Committing the transaction on transaction manager");