diff options
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/user.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php index ed0d14a1ab9..0a52be7565d 100644 --- a/lib/private/legacy/user.php +++ b/lib/private/legacy/user.php @@ -125,9 +125,16 @@ class OC_User { * setup the configured backends in config.php */ public static function setupBackends() { - OC_App::loadApps(array('prelogin')); - $backends = \OC::$server->getSystemConfig()->getValue('user_backends', array()); + OC_App::loadApps(['prelogin']); + $backends = \OC::$server->getSystemConfig()->getValue('user_backends', []); + if (isset($backends['default']) && !$backends['default']) { + // clear default backends + self::clearBackends(); + } foreach ($backends as $i => $config) { + if (!is_array($config)) { + continue; + } $class = $config['class']; $arguments = $config['arguments']; if (class_exists($class)) { |