Nb : If for security reasons, you desire to not mail access data, then simply do not pass the UserName variable to the php mail() function that sends a confirmation to the registering Member, just set in there his new reworked password and inform him that his UserName remains the same he choosed during registration ... by doing so if the e-mail reaches a wrong address, then the missing UserName is like a Password for the wrong receiver.
To test this program ... just login as :
Username = Test
Password = 6tester7
Or make your own test-registration
... in this case don't forget to check your E-mail
. . . to retrieve your re-worked password string :-)