mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	check if argument passed to setOwner() is a user
This commit is contained in:
		
							parent
							
								
									fb86b4330c
								
							
						
					
					
						commit
						b5a6ea330b
					
				|  | @ -707,6 +707,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ | |||
| 	function setOwner($newOwner) { /* {{{ */ | ||||
| 		$db = $this->_dms->getDB(); | ||||
| 
 | ||||
|         if(!$newOwner) | ||||
|             return false; | ||||
| 
 | ||||
|         if(!$newOwner->isType('user')) | ||||
|             return false; | ||||
| 
 | ||||
| 		$queryStr = "UPDATE `tblDocuments` set `owner` = " . $newOwner->getID() . " WHERE `id` = " . $this->_id; | ||||
| 		if (!$db->getResult($queryStr)) | ||||
| 			return false; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann