I just upgraded our site (www.theforvm.org) from v4.7.4 to v5.7. I did a "dry run" upgrade a week ago, on a test box with a backed up database, and everything seemed to work properly. However, now that the site is being used by multiple users I'm seeing very strange login behavior. I can login under my name, everything works properly, but as soon as another user logs in my Navigation block changes to that user's login name and is limited to what they are allowed to see (no link to Administer, for example). I can log out, which does show up in the logs, and then login under my own name and everything works fine until the next user logs in, at which point my Navigation block changes to the new user's name. I've disabled the modules masquerade and persistent login but that doesn't seem to affect the problem.
However, if I post content it posts under my name and appears to reset the navigation box to my name. I appear to actually be logged in under my name but the Navigation menu shows the latest logged in users name. Very strange.
My web server info is as follows:
Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b PHP/4.4.4 MySQL/4.1.22
Any assistance would be greatly appreciated.
Comments
Comment #1
hankp98072- commentedAddon comment - it appears that when the Navigation block shows the wrong user name, any content created by the user will appear under the incorrect user path. In other words, if user aaa has user bbb's name showing in the Navigation block, when user aaa creates a newdiary (blog) it shows up with the path www.example.com/diaries/bbb/newdiary or www.example.com/diaries/[user]/newdiary. The diary itself is shown as being created by user aaa, though.
Comment #2
hankp98072- commentedComment #3
eaton commentedThe first thing that springs to mind is that something in the theme, or a custom function defined in a custom module is monkeying around with the $user global variable. Drupal stores the account information for the currently logged in user in the $user global, and many modules check it to build stuff like the navigation block and so on. Unfortunately, a simple typo or some bad logic can actually *change* the id of the logged in user, effectively switching you to a different account transparently. For example, if a module wants to check the ID of the current user but a typo turns 'if ($user->uid == 1)' into 'if ($user->uid = 1)', then every user who uses that module's feature will immediately become user ID 1, until they log out and back in.
Are there any custom modules in use on the site, or existing modules that have been hacked up? It's possible that one of them is causing this behavior.
Comment #4
ainigma32 commentedI'm going to assume that Eaton provided the info that solved this problem.
If that is incorrect feel free to reopen the issue.
- Arie
Comment #5
hankp98072- commentedSorry for not following up. The solution was to clear out the sessions table and all the cache tables, that did the trick.