Switching user on an offline site
Tech Drupal Drupal Planet Devel
2008-03-18

If you’re using the Devel module while developing with Drupal, you may have enabled the “Switch users” block which is great for troubleshooting and configuring permissions.

However, if you accidentally use it while your site is in maintenance mode (offline), then you may notice a problem: it won’t let you back to the path /user to log in again.

The solution is to use the mysql CLI, phpMyAdmin or the database manager of choice to directly empty the sessions table. Then you’ll be able to access /user without being redirected.