<h2 class="title"><?php p($l->t('Update needed')) ?></h2>
<div class="infogroup">
<?php if ($_['tooBig']) {
- p($l->t('Please use the command line updater because you have a big instance.'));
+ p($l->t('Please use the command line updater because you have a big instance with more than 50 users.'));
} else {
p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
} ?><br><br>
$tooBig = false;
if (!$disableWebUpdater) {
$apps = \OC::$server->getAppManager();
- $tooBig = $apps->isInstalled('user_ldap') || $apps->isInstalled('user_shibboleth');
+ $tooBig = false;
+ if ($apps->isInstalled('user_ldap')) {
+ $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+
+ $result = $qb->selectAlias($qb->createFunction('COUNT(*)'), 'user_count')
+ ->from('ldap_user_mapping')
+ ->execute();
+ $row = $result->fetch();
+ $result->closeCursor();
+
+ $tooBig = ($row['user_count'] > 50);
+ }
+ if (!$tooBig && $apps->isInstalled('user_saml')) {
+ $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+
+ $result = $qb->selectAlias($qb->createFunction('COUNT(*)'), 'user_count')
+ ->from('user_saml_users')
+ ->execute();
+ $row = $result->fetch();
+ $result->closeCursor();
+
+ $tooBig = ($row['user_count'] > 50);
+ }
if (!$tooBig) {
// count users
$stats = \OC::$server->getUserManager()->countUsers();