Don't run on OCC

Fixes https://github.com/nextcloud/user_saml/issues/46

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2016-11-14 14:08:55 +01:00
parent edff077ea0
commit d02ac11b12
No known key found for this signature in database
GPG key ID: B9F6980CF6E759B1

View file

@ -21,6 +21,12 @@
require_once __DIR__ . '/../3rdparty/vendor/autoload.php';
// If we run in CLI mode do not setup the app as it can fail the OCC execution
// since the URLGenerator isn't accessible.
if(OC::$CLI) {
return;
}
\OCP\App::registerAdmin('user_saml', 'admin');
\OCP\App::registerPersonal('user_saml', 'personal');