aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Command/CheckGroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/Command/CheckGroup.php')
-rw-r--r--apps/user_ldap/lib/Command/CheckGroup.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/user_ldap/lib/Command/CheckGroup.php b/apps/user_ldap/lib/Command/CheckGroup.php
index 68f96512a9b..0a9aff55fc9 100644
--- a/apps/user_ldap/lib/Command/CheckGroup.php
+++ b/apps/user_ldap/lib/Command/CheckGroup.php
@@ -106,20 +106,22 @@ class CheckGroup extends Command {
$this->service->handleCreatedGroups([$gid]);
}
}
- return 0;
- } elseif ($wasMapped) {
+ return self::SUCCESS;
+ }
+
+ if ($wasMapped) {
$output->writeln('The group does not exist on LDAP anymore.');
if ($input->getOption('update')) {
$this->backend->getLDAPAccess($gid)->connection->clearCache();
$this->service->handleRemovedGroups([$gid]);
}
- return 0;
- } else {
- throw new \Exception('The given group is not a recognized LDAP group.');
+ return self::SUCCESS;
}
+
+ throw new \Exception('The given group is not a recognized LDAP group.');
} catch (\Exception $e) {
$output->writeln('<error>' . $e->getMessage(). '</error>');
- return 1;
+ return self::FAILURE;
}
}