I am using an implementation of drupal in php5. When I request a new password, I do not get any messages after completing the request. I am sent back to log-in tab. I traced the error to the user_load function where $user is returned initialized to StdClass, and then passing the condition if($account) in the function user_pass thus never showing the message.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | user_load.patch | 2.88 KB | killes@www.drop.org |
Comments
Comment #1
Diego Camacho commentedThis error only happens when you enter and invalid account name
Comment #2
trebuchet commentedDiego, is the problem you're experiencing related to this one? I think it might be the result of differences in the way php 4 and 5 handle objects.
Comment #3
killes@www.drop.org commenteduser_load indeed needs to be changed to return FALSE in case of failure. Attached is a patch. I reviewed all core modules and I am fairly certain that nothign breaks. But I didn't do a real test. I do not know if contrib modules will break due to this change.
I guess it should be fixed for 4.6 too.
Comment #4
killes@www.drop.org commenteduser_load has been changed to return FALSE.
Comment #5
(not verified) commented