WebsiteBaker Community Forum

General Community => Global WebsiteBaker 2.8.x discussion => Topic started by: nl on January 15, 2008, 11:28:25 AM

Title: Bug in user signup
Post by: nl on January 15, 2008, 11:28:25 AM
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.

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

this works:

Code: [Select]
       $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.