修复注册成功后登录状态未变更的BUG

优化安装脚本跳转
pull/233/head
Karson 2020-08-28 14:58:02 +08:00
parent e31a546b48
commit 8058ba312b
3 changed files with 10 additions and 7 deletions

View File

@ -179,6 +179,9 @@ class Auth
$this->_token = Random::uuid();
Token::set($this->_token, $user->id, $this->keeptime);
//设置登录状态
$this->_logined = true;
//注册成功的事件
Hook::listen("user_register_successed", $this->_user, $data);
Db::commit();

View File

@ -11,14 +11,14 @@
// +----------------------------------------------------------------------
// [ 后台入口文件 ]
// 使用此文件可以达到隐藏admin模块的效果
// 建议将admin.php改成其它任意的文件名同时修改config.php中的'deny_module_list',把admin模块也添加进去
// 为了你的安全强烈不建议将此文件名修改成admin.php
// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
// 判断是否安装
if (!is_file(APP_PATH . 'admin/command/Install/install.lock'))
{
header("location:./install.php");
if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: {$_SERVER['REQUEST_SCHEME']}://{$_SERVER['HTTP_HOST']}{$uri}/install.php");
exit;
}

View File

@ -14,9 +14,9 @@
define('APP_PATH', __DIR__ . '/../application/');
// 判断是否安装
if (!is_file(APP_PATH . 'admin/command/Install/install.lock'))
{
header("location:./install.php");
if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) {
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: {$_SERVER['REQUEST_SCHEME']}://{$_SERVER['HTTP_HOST']}{$uri}/install.php");
exit;
}