找到/application/Admin/Controller/PublicController.class.php
将27-31行去除:
$loginAllowed = session("__LOGIN_BY_CMF_ADMIN_PW__");
if (empty($loginAllowed)) {
//$this->error('非法登录!', cmf_get_root() . '/');
return redirect(cmf_get_root() . "/");
}
找到37-38
session("__SP_ADMIN_LOGIN_PAGE_SHOWED_SUCCESS__", true);
$result = hook_one('admin_login');
中间加一行
session("__SP_ADMIN_LOGIN_PAGE_SHOWED_SUCCESS__", true);
session("__LOGIN_BY_CMF_ADMIN_PW__", 1);
$result = hook_one('admin_login');
替换后就可以正常登陆了(^-^)V