Commit 59070c2c authored by michael.simon's avatar michael.simon
Browse files

correctly ignore deregistered users on user update

parent 5f1017a7
......@@ -187,7 +187,7 @@ public class JpaUserDao extends JpaBaseDao<UserEntity, Long> implements UserDao,
@Override
@SuppressWarnings({"unchecked"})
public List<UserEntity> findScheduledUsers(Integer limit) {
return em.createQuery("select e from UserEntity e where e.userStatus != :status and e.scheduledUpdate < :date or e.scheduledUpdate is null")
return em.createQuery("select e from UserEntity e where e.userStatus != :status and (e.scheduledUpdate < :date or e.scheduledUpdate is null)")
.setParameter("date", new Date())
.setParameter("status", UserStatus.DEREGISTERED)
.setMaxResults(limit).getResultList();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment