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

pull/278/head
David Goodwin 5 years ago
parent 7ed4df5459
commit ad858592f4

@ -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;

Loading…
Cancel
Save