phpcms_v9 非超级管理员后台修改不成功

修改 /phpcms/modules/admin/admin_manage.php


public function edit() {
        if(isset($_POST['dosubmit'])) {
            $memberinfo = $info = array();   
                   
          //$info = checkuserinfo($_POST['info']);
            $info = $_POST['info'];//modify
            if(isset($info['password']) && !empty($info['password']))
            {
                $this->op->edit_password($info['userid'], $info['password']);
            }
            $userid = $info['userid'];
            $admin_fields = array('username', 'email', 'roleid','realname');
            foreach($info as $k=>$value) {
                if (!in_array($k, $admin_fields)){
                    unset($info[$k]);
                }
            }
            $this->db->update($info,array('userid'=>$userid));
            showmessage(L('operation_success'),'','','edit');
        } else {                 
            $info = $this->db->get_one(array('userid'=>$_GET['userid']));
            extract($info);
            $roles = $this->role_db->select(array('disabled'=>'0'));
            $show_header = true;
            include $this->admin_tpl('admin_edit');   
        }
    }
                           


你可能感兴趣的:(phpcms_v9)