This Function Has Been Available Since:|
(AFCommerce v 2.1, Functions v 1.1)
Creates a temporary password for a user to log in with.
string = afc_create_new_temp_password (memberid)
This function is used with the "forgot password" script. Since version 2 now encrypts passwords in the database, the cart can no longer email a member their password when they forget it. So this function creates a temporary password, and allows the member to log in with that password, and prompts them to change their password once they log in. This was a pretty big improvement from version 1, although, since there is no personal information stored in the database for each member, this step is not really necessary. Many programmers wanted this anyway though, so I made this feature available in version 2.
memberid (integer) - The member id of the user that is requesting a new password.
Returns the new temporary password as a string.
Open Source: Yes