dedecms 不允许管理员账户前台登陆的解决方法,找到文件 ./include/memeberlogin.class.PHP 找到函数CheckUser() 修改 if(is_array($row)) { if($this-GetShortPwd($row[pwd]) != $this-GetEncodePwd($loginpwd)) { return -1; } e
if(is_array($row))
{
if($this->GetShortPwd($row['pwd']) != $this->GetEncodePwd($loginpwd))
{
return -1;
}
else
{
//管理员帐号不允许从前台登录
if($row['matt']==10) {
#return -2;
//修改 允许管理账户前台登陆
$this->PutLoginInfo($row['mid'], $row['logintime']);
return 1;
}
else {
$this->PutLoginInfo($row['mid'], $row['logintime']);
return 1;
}
}
}
这样管理员账户就能从前台登陆
