Advertisement:

Author Topic: Changing username breaks login and recover password functionality.  (Read 2125 times)

Offline gemusli

  • Newbie
  • *
  • Posts: 6
    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?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,631
  • Gender: Male
    • Kindred-999 on GitHub
Re: Changing username breaks login and recover password functionality.
« Reply #1 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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline gemusli

  • Newbie
  • *
  • Posts: 6
Re: Changing username breaks login and recover password functionality.
« Reply #2 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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,631
  • Gender: Male
    • Kindred-999 on GitHub
Re: Changing username breaks login and recover password functionality.
« Reply #3 on: October 03, 2015, 05:49:52 PM »
whew... :D
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.