Skip to content
Snippets Groups Projects
Commit 611e112d authored by srosse's avatar srosse
Browse files

OO-3974: don't propose new users in deletion process (patch S. Clemenz)

parent 09ea29ed
No related branches found
No related tags found
No related merge requests found
......@@ -180,7 +180,7 @@ public class UserDeletionManager {
StringBuilder sb = new StringBuilder(512);
sb.append("select ident from ").append(IdentityImpl.class.getName()).append(" as ident")
.append(" inner join fetch ident.user as user")
.append(" where ident.status=").append(Identity.STATUS_ACTIV).append(" and (ident.lastLogin = null or ident.lastLogin < :lastLogin)")
.append(" where ident.status=").append(Identity.STATUS_ACTIV).append(" and ((ident.lastLogin = null and ident.creationDate < :lastLogin) or ident.lastLogin < :lastLogin)")
.append(" and exists (select orgtomember.key from bgroupmember as orgtomember ")
.append(" inner join organisation as org on (org.group.key=orgtomember.group.key)")
.append(" where orgtomember.identity.key=ident.key and org.key in (:organisationKeys) and orgtomember.role='").append(OrganisationRoles.user).append("')");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment