Closed (fixed)
Project:
Drupal core
Component:
user.module
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
19 Jun 2005 at 22:15 UTC
Updated:
19 Jan 2006 at 20:20 UTC
Jump to comment: Most recent file
Once a user has been switched from active to blocked state in user administration, their "Member since:" date shows since UNIX epoch.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | user.module_4.patch | 415 bytes | viksit |
| blockeduserepoch.png | 4.15 KB | deekayen |
Comments
Comment #1
deekayen commentedSo far I blame the query in user_load() which comes out something like:
Then user_load() never calls user_module_invoke() in the db_num_rows() if statement because blocked users don't return because of the
LOWER(u.status) = '1'in the query. So when user_user does math on an empty $user object, the date comes out wrong when loading the view page on a blocked user.I don't know why the if statement of user_view() forces
'status' => 1, but if you remove it, the blocked user "Member since" date is corrected.The only call I saw for user_view() in grep was in user_page().
One of the side effects of this bug was blocked users didn't have anything show under their History part of their View tab. For example, removing
'status' => 1will show "view recent blog entries" if you have blog.module loaded. I don't really think that's my position to say if that's a desireable behavior or not, so I'll just leave this hanging. I also don't really know what status > 1 would mean, so it might instead be desireable to make a change so the query in user_load() grabsLOWER(u.status) <= '1'.Comment #2
viksit commentedLooking at it.
Comment #3
viksit commentedAh, assigned.
Comment #4
viksit commentedWell, I tried alternate approaches, but what seemed to work best was as suggested above.
The patch's attached here..
Cheers,
Comment #5
viksit commenteduploaded above..
Comment #6
Bèr Kessels commentedHmm, I dislike the idea of this. Simply taking out that status =1 parameter, will show blocked users on certain areas, where you /dont/ want them to show up at all.
The user page, for one, must not be accessible for users that are blocked.
Comment #7
robin monks commented-1 from me too.
This has far reaching consequences. Can't we just fix the date query?
Robin
Comment #8
deekayen commentedappears to be fixed in HEAD
Comment #9
(not verified) commented