From ad858592f4e221a3bbd58efd6403bda98222f675 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Fri, 26 Apr 2019 11:34:21 +0100 Subject: [PATCH] remove password_expiry logic from generic db_update function; the various *Handler classes should fix the password_expiry field already and this just breaks PgSQL; see #264 --- functions.inc.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index 2161e2c2..38d8b79c 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1835,18 +1835,6 @@ function db_update($table, $where_col, $where_value, $values, $timestamp = array } } - /* @todo this needs refactoring/moving out from here */ - if (Config::bool('password_expiration')) { - if ($table == 'mailbox' && preg_match('/@/', $where_value)) { - $email = $where_value; - $domain_dirty = explode('@',$email)[1]; - $domain = substr($domain_dirty, 0, -1); - $password_expiration_value = get_password_expiration_value($domain); - $key = 'password_expiry'; - $set[] = " $key = now() + interval {$password_expiration_value} day"; - } - } - $pvalues['where'] = $where_value;