Skip to content

Commit

Permalink
Issue #2797253 by hart0554: Login while site in Maintenance Mode?
Browse files Browse the repository at this point in the history
  • Loading branch information
hart0554 authored and dakkusingh committed Dec 12, 2017
1 parent b6445a2 commit 9fadbc4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions simplesamlphp_auth.module
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ function simplesamlphp_auth_menu() {
return $items;
}

/**
* Implements hook_menu_site_status_alter().
*/
function simplesamlphp_auth_menu_site_status_alter(&$menu_site_status, $path) {
// Allow access to authenticate even if site is in offline mode.
$login_path = variable_get('simplesamlphp_auth_login_path', 'saml_login');
if ($menu_site_status == MENU_SITE_OFFLINE && user_is_anonymous() && $path == $login_path) {
$menu_site_status = MENU_SITE_ONLINE;
}
}

/**
* Implements hook_help().
*/
Expand Down

0 comments on commit 9fadbc4

Please sign in to comment.