Frontend Users


[#8476] Lost Password Request Retrieves The Last Found Email Address

Created By: John Beatrice (mww)
Date Submitted: Thu Oct 04 04:01:39 -0400 2012

Assigned To: Robert Campbell (calguy1000)
Version: 1.17.3
CMSMS Version: 1.10.3
Severity: Major
Resolution: None
State: Open
Lost Password Request Retrieves The Last Found Email Address
Detailed Description:
This can be recreated in version 1.17.3+ with the following:
1) Email addresses are NOT used as usernames
2) There is more than one Email Property (Type 2) created and assigned for an
FEU group
3) FEU has submitted a valid email address for all 'Email' field prompts.

When using Lost Password, the GetEmail function returns the last email address
found when querying the FEU's record.
This may not be seen as a 'Bug' in most cases because it returns an email
address.  However, there isn't a reliable way to know which email address the
lost password request will be sent to.  For example, consider the following FEU
Properties (all type 2, Email):

Primary Email Address  (email1)  [[ Required ]]
Work Email Address  (email2)  [[ Optional ]]
Alternate Email Address  (email3)  [[ Optional ]]
Your Best Friend's Email Address  (email4)  [[ Optional ]]

If all 4 properties are provided by the FEU, the function will use the (email4)
property. In the scenario above, the (email1) prop would be the desired email
address to send the Lost Password request.

Around line 1246 of the lib/class.FrontEndUsersManipulator.php file, I made a
quick edit so I can control which email prop is returned.  But, it is not a
recommended solution and is only specific to my situation (untested for everyone

$q = 'SELECT data FROM
WHERE ( name="email1" AND title="email1") AND name=title AND type=2 AND userid =