Bug: "Forgot your username or password?"

Bug: "Forgot your username or password?"

by Pieter Ruts -
Number of replies: 5
Hi everyone, I don't know if it 's mensioned, but I think I 've found some kind of a bug. When I tried to reset my password, I saw the emailadres of the last user that also had a password problem. I just wanted to say it Pieter
Average of ratings: -
In reply to Pieter Ruts

Re: Bug: "Forgot your username or password?"

by N Hansen -
Pieter-Was that person using the same computer as you? If so, this behavior is expected.
In reply to N Hansen

Re: Bug: "Forgot your username or password?"

by Pieter Ruts -
I don't hope so, otherwise we have a serious security issue @ our office. There has to be something wrong with the session variables or something like that. I wasn't able to check it out at our version. We had to do a memoryupgrade... Pieter
In reply to Pieter Ruts

Re: Bug: "Forgot your username or password?"

by Julio Ody -
Check this thread.
In reply to Julio Ody

Re: Bug: "Forgot your username or password?"

by Pieter Ruts -
Ok, but can you explain me how it comes that I see the email adres of this user?
In reply to Pieter Ruts

Re: Bug: "Forgot your username or password?"

by Julio Ody -
Because of these lines:

if($username = get_moodle_cookie() ) {
     $frm->email = get_field("user", "email", "username", "$username");
}

Last user logged in the system leaves data on moodle cookie. Moodle uses this data to query database for more info, which includes the email address, and fills the form field with it's value.