We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e7ec1d commit e3f59feCopy full SHA for e3f59fe
lib/private/legacy/OC_User.php
@@ -36,6 +36,7 @@
36
*
37
*/
38
39
+use OC\User\LoginException;
40
use OCP\EventDispatcher\IEventDispatcher;
41
use OCP\ILogger;
42
use OCP\IUserManager;
@@ -171,6 +172,10 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe
171
172
if (self::getUser() !== $uid) {
173
self::setUserId($uid);
174
$userSession = \OC::$server->getUserSession();
175
+ if ($userSession->getUser() && !$userSession->getUser()->isEnabled()) {
176
+ $message = \OC::$server->getL10N('lib')->t('User disabled');
177
+ throw new LoginException($message);
178
+ }
179
$userSession->setLoginName($uid);
180
$request = OC::$server->getRequest();
181
$userSession->createSessionToken($request, $uid, $uid);
0 commit comments