Bug in user signup

nl

Hi,

I think I have found a bug in the user sign up script.

If the confirmation email can not be sent, the user is shown an error message on screen and the script dies. There is, after this, a database call to DELETE the details the user has just entered from the database.

This call is made after the script dies so the entered user details are never removed.

       $wb->print_error($MESSAGE['FORGOT_PASS']['CANNOT_EMAIL'], $js_back, false);
       $database->query("DELETE FROM ".TABLE_PREFIX."users WHERE username = '$username'");


this works:

       $database->query("DELETE FROM ".TABLE_PREFIX."users WHERE username = '$username'");
       $wb->print_error($MESSAGE['FORGOT_PASS']['CANNOT_EMAIL'], $js_back, false);
       


I hope I have posted this to the right place.