dotjason Posted October 10, 2013 Report Share Posted October 10, 2013 Hi, I have been getting Blesta 3.0.4 setup, so far it's very nice (I'm a PHP Developer myself). I have run into a bug in which even if I leave the checkbox for "Send Account Registration Email" unchecked, the email is still sent. Investigating this a bit further, it's a simple coding if statement mistake and was super easy to fix too. File: app/models/clients.php Function: create($vars) Line: 131 The if statement is as follows: if (!isset($vars['send_registration_email']) || $vars['send_registration_email'] == "true") { The issue is that if the variable isnt set it pases that if statement, and standard browser behavour doesn't send un-checked items, so thats the bug, a simple fix up as follows works perfectly: if (isset($vars['send_registration_email']) && $vars['send_registration_email'] == "true" ) { Hope this helps, not too big of a deal, but needs to be fixed . Thanks -Jason Evaske 1 Link to comment Share on other sites More sharing options...
Cody Posted October 10, 2013 Report Share Posted October 10, 2013 Looks like the issue is with the controller that invokes that method, as the documented behavior of the Clients::create() method is to always send the welcome email unless 'send_registration_email' is explicitly != "true". Link to comment Share on other sites More sharing options...
Tyson Posted October 10, 2013 Report Share Posted October 10, 2013 Fixed in CORE-817 for v3.0.5. dotjason and Michael 2 Link to comment Share on other sites More sharing options...
Paul Posted October 10, 2013 Report Share Posted October 10, 2013 Thanks for reporting this! dotjason 1 Link to comment Share on other sites More sharing options...
Recommended Posts