mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
set pwdexpiration to null if no date is set
This commit is contained in:
parent
90cca10460
commit
7c84cc1b52
|
@ -1280,10 +1280,10 @@ class SeedDMS_Core_DMS {
|
|||
if($role == '')
|
||||
$role = '0';
|
||||
if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never')
|
||||
$pwdexpiration = '0000-00-00 00:00:00';
|
||||
$pwdexpiration = null;
|
||||
elseif(trim($pwdexpiration) == 'now')
|
||||
$pwdexpiration = date('Y-m-d H:i:s');
|
||||
$queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) 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).", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")";
|
||||
$queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".($pwdexpiration === null ? 'NULL' : $db->qstr($pwdexpiration)).", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")";
|
||||
$res = $this->db->getResult($queryStr);
|
||||
if (!$res)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user