diff options
Diffstat (limited to 'apps/user_ldap/user_proxy.php')
-rw-r--r-- | apps/user_ldap/user_proxy.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/user_ldap/user_proxy.php b/apps/user_ldap/user_proxy.php index b073b143e74..5ad127197f3 100644 --- a/apps/user_ldap/user_proxy.php +++ b/apps/user_ldap/user_proxy.php @@ -210,4 +210,19 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface { return $this->refBackend->hasUserListings(); } + /** + * @brief Count the number of users + * @returns int | bool + */ + public function countUsers() { + $users = false; + foreach($this->backends as $backend) { + $backendUsers = $backend->countUsers(); + if ($backendUsers !== false) { + $users += $backendUsers; + } + } + return $users; + } + } |