Forgot Password Changes

This all should work but may need to be tested a tiny bit more everything worked for me but still.
this was 
```php
if(!generateHash($password, $userdetails["password"])) {
```
orignally but didnt work on remote host changed to
```php
if(generateHash($password, $userdetails["password"])) {
```
and it works fine. Is this the correct usage?