- use CURRENT_TIMESTAMP instead of now() in createPasswordRequest()

This commit is contained in:
steinm 2013-01-29 13:17:32 +00:00
parent a6bb059d9d
commit beb82e94c8

View File

@ -1405,7 +1405,7 @@ class LetoDMS_Core_DMS {
*/
function createPasswordRequest($user) { /* {{{ */
$hash = md5(uniqid(time()));
$queryStr = "INSERT INTO tblUserPasswordRequest (userID, hash, `date`) VALUES (" . $user->getId() . ", " . $this->db->qstr($hash) .", now())";
$queryStr = "INSERT INTO tblUserPasswordRequest (userID, hash, `date`) VALUES (" . $user->getId() . ", " . $this->db->qstr($hash) .", CURRENT_TIMESTAMP)";
$resArr = $this->db->getResult($queryStr);
if (is_bool($resArr) && !$resArr) return false;
return $hash;