Several websites including Facebook have implemented this mechanism of password recovery. Just before the user opts in to recover a forgotten password, the system shows a snapshot of the profile details based on the user's provided username or email id. This mechanism creates a fantastic user experience and also enhances the UI appearance. I have implemented this with the help of PHP script.