/** * 更新用户登录信息 * @param $id * @param $username */ protected function update_login($uid = NULL, $username = NULL) { if ($uid && $username) { session('user_id', $uid); session('user_name', $username); logs_action_operate('登陆成功'); } return false; }
/** * 更新用户登录信息 * @param $id * @param $username */ protected function update_login($uid = NULL, $username = NULL) { if ($uid && $username) { session('user_id', $uid); session('user_name', $username); /* 读取用户权限 */ $authRules = array(); if ($uid != C('MANAGER_ADMINISTRATOR')) { $Auth = new \Manager\ORG\Auth(); $authList = $Auth->getAuthList($uid, 1); foreach ($authList as $k => $v) { $authRules[] = $v['menu_id']; } } session('auth_rules', array_unique($authRules)); logs_action_operate('登陆成功'); } return false; }
protected function _after_delete($data, $options) { /* 记录数据操作日志 */ $remark = '删除数据'; logs_action_operate($remark, $data, $options); }
public function logout() { logs_action_operate('退出登录'); session(NULL); $this->redirect('login'); }