Skip to content

Commit

Permalink
RS-7433: Counting users in "General info" is not working in Oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
edu-de committed May 23, 2023
1 parent 400b918 commit ff5cc0c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,14 +434,15 @@ public long getNumberOfActiveUsers() {
@Override
public long getNumberOfInhibitedUsers() {
return ((Number) entityManagerProvider.get()
.createQuery("SELECT COUNT(p) FROM UserProperty p WHERE p.key = 'accountInhibited' and p.value = 'true'")
.createQuery("SELECT COUNT(p) FROM UserProperty p WHERE p.key = 'accountInhibited' and STR(p.value) = 'true'")
.getSingleResult()).longValue();
}

@Override
public long getNumberOfExpiredUsers() {
return ((Number) entityManagerProvider.get()
.createQuery("SELECT COUNT(p) FROM UserProperty p WHERE p.key = 'accountExpirationDate' and cast(p.value as long) < " + Long.toString(new Date().getTime()))
return ((Number) entityManagerProvider.get().createQuery(
"SELECT COUNT(p) FROM UserProperty p WHERE p.key = 'accountExpirationDate' and cast(STR(p.value) as long) < "
+ Long.toString(new Date().getTime()))
.getSingleResult()).longValue();
}

Expand Down

0 comments on commit ff5cc0c

Please sign in to comment.