mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
trim email, commen, language, theme before saving in database
This commit is contained in:
parent
3101d6d952
commit
e36f6ee15c
|
@ -389,7 +389,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
function setEmail($newEmail) { /* {{{ */
|
function setEmail($newEmail) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblUsers` SET `email` =".$db->qstr($newEmail)." WHERE `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblUsers` SET `email` =".$db->qstr(trim($newEmail))." WHERE `id` = " . $this->_id;
|
||||||
$res = $db->getResult($queryStr);
|
$res = $db->getResult($queryStr);
|
||||||
if (!$res)
|
if (!$res)
|
||||||
return false;
|
return false;
|
||||||
|
@ -410,7 +410,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
function setLanguage($newLanguage) { /* {{{ */
|
function setLanguage($newLanguage) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblUsers` SET `language` =".$db->qstr($newLanguage)." WHERE `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblUsers` SET `language` =".$db->qstr(trim($newLanguage))." WHERE `id` = " . $this->_id;
|
||||||
$res = $db->getResult($queryStr);
|
$res = $db->getResult($queryStr);
|
||||||
if (!$res)
|
if (!$res)
|
||||||
return false;
|
return false;
|
||||||
|
@ -431,7 +431,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
function setTheme($newTheme) { /* {{{ */
|
function setTheme($newTheme) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblUsers` SET `theme` =".$db->qstr($newTheme)." WHERE `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblUsers` SET `theme` =".$db->qstr(trim($newTheme))." WHERE `id` = " . $this->_id;
|
||||||
$res = $db->getResult($queryStr);
|
$res = $db->getResult($queryStr);
|
||||||
if (!$res)
|
if (!$res)
|
||||||
return false;
|
return false;
|
||||||
|
@ -452,7 +452,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
function setComment($newComment) { /* {{{ */
|
function setComment($newComment) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblUsers` SET `comment` =".$db->qstr($newComment)." WHERE `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblUsers` SET `comment` =".$db->qstr(trim($newComment))." WHERE `id` = " . $this->_id;
|
||||||
$res = $db->getResult($queryStr);
|
$res = $db->getResult($queryStr);
|
||||||
if (!$res)
|
if (!$res)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user