mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
Update UserService.java
This commit is contained in:
parent
4d6f951604
commit
a8bc788628
@ -475,6 +475,12 @@ public class UserService implements UserServiceInterface {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getTotalUsersCount() {
|
public long getTotalUsersCount() {
|
||||||
return userRepository.count();
|
// Count all users in the database
|
||||||
|
long userCount = userRepository.count();
|
||||||
|
// Exclude the internal API user from the count
|
||||||
|
if (findByUsernameIgnoreCase(Role.INTERNAL_API_USER.getRoleId()).isPresent()) {
|
||||||
|
userCount -= 1;
|
||||||
|
}
|
||||||
|
return userCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user