Skip to content

Commit

Permalink
✨ 其他改进
Browse files Browse the repository at this point in the history
  • Loading branch information
Wisp X committed Dec 20, 2021
1 parent cbe0f58 commit 9842338
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/index/controller/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public function register()
Session::flash('success', '注册成功');
$this->redirect(url('auth/login'));
}

if ($this->getConfig('close_register')) {
abort(404, '系统已关闭注册');
}
return $this->fetch();
}

Expand Down
2 changes: 2 additions & 0 deletions application/index/view/auth/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
</form>
<p class="mdui-clearfix mdui-m-t-1">
<a class="mdui-float-left" href="{:url('auth/forgot')}">忘记密码?</a>
{if !$config.close_register}
<a class="mdui-float-right" href="{:url('auth/register')}">注册账号</a>
{/if}
</p>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions application/index/view/common/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@
<i class="mdui-list-item-icon mdui-icon material-icons iconfont icon-login mdui-text-color-teal"></i>
<div class="mdui-list-item-content">登录</div>
</a>
{if !$config.close_register}
<a class="mdui-list-item mdui-ripple {if $uri eq 'auth/register'}mdui-list-item-active{/if}" href="{:url('auth/register')}">
<i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-purple">&#xe7f0;</i>
<div class="mdui-list-item-content">注册</div>
</a>
{/if}
{/if}
</div>
</div>
{/block}
Expand Down

0 comments on commit 9842338

Please sign in to comment.