[ticket/11579] Remove unnecessary globals from validate_password()

The globals $db and $user are not used in that function.

PHPBB3-11579