We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b28cabe commit 4e63a68Copy full SHA for 4e63a68
src/main/java/stirling/software/SPDF/config/security/UserService.java
@@ -475,6 +475,12 @@ public void syncCustomApiUser(String customApiKey) {
475
476
@Override
477
public long getTotalUsersCount() {
478
- return userRepository.count();
+ // Count all users in the database
479
+ long userCount = userRepository.count();
480
+ // Exclude the internal API user from the count
481
+ if (findByUsernameIgnoreCase(Role.INTERNAL_API_USER.getRoleId()).isPresent()) {
482
+ userCount -= 1;
483
+ }
484
+ return userCount;
485
}
486
0 commit comments