username in password-reset

By ht1080z - January 11, 2018

Hi,

Using the user-password-reset.php template page the <?php echo htmlencode( $GLOBALS['user']['username'] ); ?> don't showing the desired username when i post valid userNum & ReserCode to it. The username field remain blank.

How the $GLOBALS['user']['username'] getting the variable?

Thanks,
Karls

By leo - January 17, 2018

Hi,

It's this line of the code that gets the user from the database:

$user = mysql_get(accountsTable(), @$_REQUEST['userNum']);

Maybe try replace $GLOBALS['user']['username'] with $user['username'] and see if it's giving you the correct username?

Let me know if it works.

Thanks,

Leo - PHP Programmer (in training)
interactivetools.com

By ht1080z - January 21, 2018

Hi Leo,

Thanks for your reply. I did the same as you suggested ans worked of course.

PS: I never got notification email on your reply from the forum.

Karls