Closed (outdated)
Project:
Drupal core
Version:
6.17
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2006 at 22:33 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
edmund.kwok commentedAble to reproduce bug. I was stuck myself in the past; had to use another browser to get back to the admin account.
Took a stab and submitting a patch. Not sure if it's the best place to do this, but in menu.inc, if user has no 'administer site configuration' privileges, and if the $user->uid != 0 (non-admin user logged on), the user will be logged out and redirected to the main page with the offline message.
Comment #2
drummThis should provide some feedback with drupal_set_message() when that happens.
Comment #3
edmund.kwok commentedHmm, drupal_goto seems to flush any drupal_set_message before of after it. Any other way to display a message? Or we'll have to use something like header()?
Comment #4
ahoeben commentedShouldn't it be '$user->uid != 1' instead? uid==0 is the anonymous user, right?
Comment #5
edmund.kwok commentedYes, uid == 0 is the anonymous user. So we're making sure only unauthorized users who logged in will be logged out. If we use uid != 1, then all other users (including authorized users) except the admin account will also be logged out.
Comment #6
ahoeben commentedNevermind, I did not fully read in to the patch... I was worried the patch would also throw the admin out, because I did not notice the access check above.
Comment #7
Steven commentedMessages normally persist across goto calls. However, messages are kept in the session, which is destroyed when you log out.
Comment #8
rkerr commentedIf the site is "Offline" ... how are users (other than uid 1 or admins) able to log in at all? Seems this condition should never be allowed to occur in the first place.
Comment #9
Coupon Code Swap commentedI found this thread looking for a solution to something else that is related. I'd like to be able to demo a site that is off-line to authenticated users. I want the site to appear off-line to everyone except users that I have created a user account for so they can log in and see the site in off-line mode. However, I don't want them to have administrative privileges. Is something like this possible? I created a thread specifically for this question:
http://drupal.org/node/133748
Comment #10
okokokok commentedThis is still happening in 6.17 when the Default front page is set to user.
Users will try to log in and will just be redirected to the login page - even when entering proper credentials.