Commit 7dea9c7a authored by gg24's avatar gg24 Committed by elachlan

Issue #2899256 by gg24: Cannot login to site while in Maintenance Mode

parent f3201a7e
......@@ -212,8 +212,8 @@ function image_captcha_captcha($op, $captcha_type = '', $captcha_sid = NULL) {
// the request for the image itself won't succeed (only ?q=user
// is permitted for unauthenticated users). We fall back to the
// Math CAPTCHA in that case.
if (defined('MAINTENANCE_MODE') && \Drupal::currentUser()
->isAnonymous()
if (\Drupal::state()->get('system.maintenance_mode')
&& \Drupal::currentUser()->isAnonymous()
) {
return captcha_captcha('generate', 'Math');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment