<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * 重写后的 CWebUser类，让checkAccess方法默认接受用户名为参数
 *
 * @author yzxh24
 */
class BackendWebUser extends CWebUser
{
    private $_keyPrefix;

	private $_access=array();

    public function checkAccess($operation,$params=array(),$allowCaching=true)
	{
		if($allowCaching && $params===array() && isset($this->_access[$operation]))
        {
			return $this->_access[$operation];
        }
		else
        {
			return $this->_access[$operation]=Yii::app()->getAuthManager()->checkAccess($operation,$this->getName(),$params);
        }
	}
}
