Maintenance mode and user session
-
24-01-2021 - |
Question
When I put site in maintenance mode and after turn site back all users sessions are not active (is need to log in account), but I put session to work 2 month and it work.
How to prevent users logout when put site in maintenance?
Solution
This is intended behavior, if user does not have "access site in maintenance mode" permission, then user is logged out.
For Drupal 7 take look on user_menu_site_status_alter
For Drupal 8 take look on Drupal\user\EventSubscriber\MaintenanceModeSubscriber
Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange