DEDE5.7进后台一片空白解决方法和退出也空白问题?

include/userlogin.class.php

keepUser() 函数里面修改以下代码,注释过的是原代码.

    function keepUser()
    {
        if($this->userID != '' && $this->userType != '')
        {
            global $admincachefile,$adminstyle;
            if(empty($adminstyle)) $adminstyle = 'dedecms';
            
            if(!isset($_SESSION[$this->keepUserIDTag]))
 //           @session_register($this->keepUserIDTag);
            $_SESSION[$this->keepUserIDTag] = $this->userID;

            if(!isset($_SESSION[$this->keepUserTypeTag]))
 //           @session_register($this->keepUserTypeTag);
            $_SESSION[$this->keepUserTypeTag] = $this->userType;

            if(!isset($_SESSION[$this->keepUserChannelTag]))
 //           @session_register($this->keepUserChannelTag);
            $_SESSION[$this->keepUserChannelTag] = $this->userChannel;

            if(!isset($_SESSION[$this->keepUserNameTag]))
 //           @session_register($this->keepUserNameTag);
            $_SESSION[$this->keepUserNameTag] = $this->userName;

            if(!isset($_SESSION[$this->keepUserPurviewTag]))
 //           @session_register($this->keepUserPurviewTag);
            $_SESSION[$this->keepUserPurviewTag] = $this->userPurview;

            if(!isset($_SESSION[$this->keepAdminStyleTag]))
 //           @session_register($this->keepAdminStyleTag);
            $_SESSION[$this->keepAdminStyleTag] = $adminstyle;

            PutCookie('DedeUserID', $this->userID, 3600 * 24, '/');
            PutCookie('DedeLoginTime', time(), 3600 * 24, '/');
            
            $this->ReWriteAdminChannel();
            
            return 1;
        }
        else
        {
            return -1;
        }
    }



    function exitUser()
    {
        ClearMyAddon();
        if(isset($_SESSION[$this->keepUserIDTag]))
          unset($_SESSION[$this->keepUserIDTag]);
        //@session_unregister($this->keepUserIDTag);
        if(isset($_SESSION[$this->keepUserTypeTag]))
          unset($_SESSION[$this->keepUserTypeTag]);
        //@session_unregister($this->keepUserTypeTag);
        if(isset($_SESSION[$this->keepUserChannelTag]))
          unset($_SESSION[$this->keepUserChannelTag]);
        //@session_unregister($this->keepUserChannelTag);
        if(isset($_SESSION[$this->keepUserNameTag]))
          unset($_SESSION[$this->keepUserNameTag]);
        //@session_unregister($this->keepUserNameTag);
        if(isset($_SESSION[$this->keepUserPurviewTag]))
          unset($this->keepUserPurviewTag);
        //@session_unregister($this->keepUserPurviewTag);
        DropCookie('dedeAdmindir');
        DropCookie('DedeUserID');
        DropCookie('DedeLoginTime');
        $_SESSION = array();
    }


你可能感兴趣的:(Linux)