framework/web/auth/CDbAuthManager.php
public function isAssigned($itemName,$userId)
	{
		return $this->db->createCommand()
			->select('itemname')
			->from($this->assignmentTable)
			->where('itemname=:itemname AND userid=:userid', array(
				':itemname'=>$itemName,
				':userid'=>$userId))
			->queryScalar() !== false;
	}
public function isAssigned($itemName,$userId)
	{
		return $this->db->createCommand()
			->select('itemname')
			->from($this->assignmentTable)
			->where('itemname=:itemname AND userid=:userid', array(
				':itemname'=>$itemName,
				':userid'=>$userId))
			->queryScalar() !== false;
	}
public function isAssigned ( $ itemName , $ userId ) { return $ this -> db -> createCommand ( ) -> select ( 'itemname' ) -> from ( $ this -> assignmentTable ) -> where ( 'itemname=:itemname AND userid=:userid' , array ( ':itemname' => $ itemName , ':userid' => $ userId ) ) -> queryScalar ( ) !== false ; }
Returns a value indicating whether the item has been assigned to the user.
@param string $itemName the item name
@param mixed $userId the user ID (see {@link IWebUser::getId})
@return boolean whether the item has been assigned to the user.
Returns a value indicating whether the item has been assigned to the user .