Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: gemusli on October 03, 2015, 03:12:35 PM

Title: Changing username breaks login and recover password functionality.
Post by: gemusli on October 03, 2015, 03:12:35 PM
    Version(s) of SMF: 2.0.11
    Your Setup:
        List any Modifications you have installed: See attached image.
        List any Themes you have installed: Default Theme
        List any non-English Language packs you have installed: None
        Are you using UTF-8? YES
        Any other related information?
        What caching level are you using? None.
    Server Software:
        Apache/IIS version?: Apache version unsure
        PHP version?: 5.3
        Database type and version: MySQL
        Any other related server information?
    Where the Error Occurred
        File:
        Line:
        Any relevant errors in the SMF error log (if so please post them)?:
    How to Reproduce this Error?:

Create a new member.  Go to edit Profile->Modify Profile->under username there is a link (change).  Click that and change the username.  I actually swapped username and Display Name.  Username started at "123", Display Name started at "456" and then I reversed them.  Don't ask why.

Try logging with new Username of "456" and you cannot login.  Try to use the "Forgot Password" functionality and it states user not found also.

Change the username back to original and Display name back to original and everything works again. 

A table is not being updated in the database to reflect the change in username correctly I think.


    Additional Information?
Title: Re: Changing username breaks login and recover password functionality.
Post by: Kindred on October 03, 2015, 05:03:14 PM
Changing the username requires the user to update the password -- because the password is stored with the hash based on the username...
(the password is never recoverable on the SMF side of things, only on the user side)

So, when the username is changed, the system SHOULD be sending the user an email with a new, temporary password.

(and it does -- I just tested)

So, if you did not receive that email, it is no wonder that you could not log in...

it's not a bug in the username/password system -- it seems to be more an issue with your email functionality
Title: Re: Changing username breaks login and recover password functionality.
Post by: gemusli on October 03, 2015, 05:16:04 PM
My apologies everything works as described I must have lost my marbles for a short time there.  Move along folks nothing to see here, issue closed.
Title: Re: Changing username breaks login and recover password functionality.
Post by: Kindred on October 03, 2015, 05:49:52 PM
whew... :D