update_hp.php is sending notification to wrong user - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: Suggestions (/forum-2.html) +--- Thread: update_hp.php is sending notification to wrong user (/thread-1035.html) |
update_hp.php is sending notification to wrong user - emers - 07-24-2007 06:50 PM Update_HP.php file has add_new_order() function, which sends email for reseller, and user. Email is an notification about updating hosting plan. The query taking these two emails from database is wrong, because it takes reseller's email, and '''first email added in first domain by this reseller'''. Should be: reseller's email, and probably first email of a domain, which is going to be updated. Patch file is as follow: --- update_hp.php.old 2005-12-31 12:11:31.000000000 +0100 +++ update_hp.php 2007-07-24 10:15:29.000000000 +0200 @@ -298,10 +298,10 @@ where t1.admin_id=? and - t2.created_by=? + t2.admin_id=? SQL_QUERY; - $rs = exec_query($sql, $query, array($_SESSION['user_created_by'], $_SESSION['user_created_by'])); + $rs = exec_query($sql, $query, array($_SESSION['user_created_by'], $_SESSION['user_id'])); $to = $rs -> fields['reseller_mail']; |