/** * 将角色赋予用户 * * @param string $auth_role 角色名称 * @param string $user_id 用户id */ public function assign($auth_role, $user_id) { if (!$this->auth->isAssigned($auth_role, $user_id)) { $this->auth->assign($auth_role, $user_id); } return TRUE; }