From 550ba16a092b82f68e8b96b00255b10b357eb462 Mon Sep 17 00:00:00 2001 From: mposolda Date: Tue, 5 Aug 2014 14:36:53 +0200 Subject: [PATCH] Fix deleting users on mongo --- .../models/mongo/keycloak/adapters/MongoUserProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java index bba9de4eb3..72340d064b 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoUserProvider.java @@ -287,7 +287,7 @@ public class MongoUserProvider implements UserProvider { @Override public boolean removeUser(RealmModel realm, UserModel user) { DBObject query = new QueryBuilder() - .and("id").is(user.getId()) + .and("_id").is(user.getId()) .and("realmId").is(realm.getId()) .get(); return getMongoStore().removeEntities(MongoUserEntity.class, query, invocationContext);