set pwdexpiration to '0000-00-00 00:00:00' if not set (addUser()) (Bug #151)

This commit is contained in:
Uwe Steinmann 2014-05-16 11:25:27 +02:00
parent 01e067a2c4
commit 1a72e2bc4e

View File

@ -1200,6 +1200,8 @@ class SeedDMS_Core_DMS {
}
if($role == '')
$role = '0';
if(trim($pwdexpiration) == '')
$pwdexpiration = '0000-00-00 00:00:00';
$queryStr = "INSERT INTO tblUsers (login, pwd, fullName, email, language, theme, comment, role, hidden, disabled, pwdExpiration) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".$db->qstr($pwdexpiration).")";
$res = $this->db->getResult($queryStr);
if (!$res)