mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
check if passed user is a valid user in setOwner()
This commit is contained in:
parent
378377780e
commit
28ddd4b5b2
|
@ -110,9 +110,12 @@ class SeedDMS_Core_KeywordCategory {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function setOwner($user) {
|
function setOwner($user) {
|
||||||
|
if(!$user || !$user->isType('user'))
|
||||||
|
return false;
|
||||||
|
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblKeywordCategories` SET `owner` = " . $user->getID() . " WHERE = `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblKeywordCategories` SET `owner` = " . $user->getID() . " WHERE `id` = " . $this->_id;
|
||||||
if (!$db->getResult($queryStr))
|
if (!$db->getResult($queryStr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user