From 46adb61924c79348051d9d3ea8b87e13a6c856ff Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 10 Oct 2013 14:48:26 +0000 Subject: [PATCH] implemented deleteAccount hook to clean up table --- emailadmin/inc/class.emailadmin_smtp_sql.inc.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/emailadmin/inc/class.emailadmin_smtp_sql.inc.php b/emailadmin/inc/class.emailadmin_smtp_sql.inc.php index 9c407ab860..af0035f9d2 100644 --- a/emailadmin/inc/class.emailadmin_smtp_sql.inc.php +++ b/emailadmin/inc/class.emailadmin_smtp_sql.inc.php @@ -345,4 +345,17 @@ class emailadmin_smtp_sql extends emailadmin_smtp } return true; } + + /** + * Hook called on account deletion + * + * @param array $_hookValues values for keys 'account_lid', 'account_id' + * @return boolean true on success, false on error + */ + function deleteAccount($_hookValues) + { + $this->db->delete(self::TABLE, array('account_id' => $_hookValues['account_id']), __LINE__, __FILE__); + + return true; + } }