Need to conditionally update user data in authentication process (mysql) - Clues?