framework/web/auth/CDbAuthManager.php
public function getAuthAssignments($userId)
	{
		$rows=$this->db->createCommand()
			->select()
			->from($this->assignmentTable)
			->where('userid=:userid', array(':userid'=>$userId))
			->queryAll();
		$assignments=array();
		foreach($rows as $row)
		{
			if(($data=@unserialize($row['data']))===false)
				$data=null;
			$assignments[$row['itemname']]=new CAuthAssignment($this,$row['itemname'],$row['userid'],$row['bizrule'],$data);
		}
		return $assignments;
	}
public function getAuthAssignments($userId)
	{
		$rows=$this->db->createCommand()
			->select()
			->from($this->assignmentTable)
			->where('userid=:userid', array(':userid'=>$userId))
			->queryAll();
		$assignments=array();
		foreach($rows as $row)
		{
			if(($data=@unserialize($row['data']))===false)
				$data=null;
			$assignments[$row['itemname']]=new CAuthAssignment($this,$row['itemname'],$row['userid'],$row['bizrule'],$data);
		}
		return $assignments;
	}
public function getAuthAssignments ( $ userId ) { $ rows = $ this -> db -> createCommand ( ) -> select ( ) -> from ( $ this -> assignmentTable ) -> where ( 'userid=:userid' , array ( ':userid' => $ userId ) ) -> queryAll ( ) ; $ assignments = array ( ) ; foreach ( $ rows as $ row ) { if ( ( $ data = @ unserialize ( $ row [ 'data' ] ) ) === false ) $ data = null ; $ assignments [ $ row [ 'itemname' ] ] = new CAuthAssignment ( $ this , $ row [ 'itemname' ] , $ row [ 'userid' ] , $ row [ 'bizrule' ] , $ data ) ; } return $ assignments ; }
Returns the item assignments for the specified user.
@param mixed $userId the user ID (see {@link IWebUser::getId})
@return array the item assignment information for the user. An empty array will be
returned if there is no item assigned to the user.
Returns the item assignments for the specified user .