diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-10-18 15:19:01 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-10-18 15:19:01 +0000 |
| commit | 1d48e606437e5f935f417755a3c9e52e79bd8d46 (patch) | |
| tree | 94ffc07c9604a36ee8ce287d6db0418f69073814 /app/controllers/admin/domain.php | |
| parent | 8306d1a7330855a7ada3eb427fabec24f6d4b9e8 (diff) | |
count in SQL, not in PHP, fixes #1677
Closes #1677
Merge request studip/studip!1080
Diffstat (limited to 'app/controllers/admin/domain.php')
| -rw-r--r-- | app/controllers/admin/domain.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/domain.php b/app/controllers/admin/domain.php index facd370..e4bb9c8 100644 --- a/app/controllers/admin/domain.php +++ b/app/controllers/admin/domain.php @@ -138,7 +138,7 @@ class Admin_DomainController extends AuthenticatedController CSRFProtection::verifyUnsafeRequest(); $domain = new UserDomain($id); - if (count($domain->users) == 0) { + if ($domain->countUsers() === 0) { $domain->delete(); } else { PageLayout::postError(_('Domänen, denen noch Personen zugewiesen sind, können nicht gelöscht werden.')); |
