默认后台没有关闭新用户注册的选项,是不是只能通过改源码实现了?
![]() | 1 uyhyygyug1234 2016-07-16 14:12:33 +08:00 via Android 前端注册的 CSS 隐藏了,不就没人能注册进来了。 |
![]() | 2 Aspx 2016-07-16 15:38:55 +08:00 via Android 你把注册页面设置权限不可访问不就行了?然后结合楼上的 CSS 操作 |
![]() | 3 Mac 2016-07-16 18:23:30 +08:00 startbbs / themes / default / register.php 直接把注册的 form 注释掉改成你不允许注册的提示不就得了 |
4 raincious 2016-07-16 18:33:19 +08:00 @Mac 噗这是在开玩笑么?收表单的代码仍然没有 Disable 啊,你这样别人构建一个表单是不是就能注册了? 我刚看了下代码,如果猜的没错的话,有两种方式: 1 、粗暴一点的: https://github.com/startbbs/startbbs/blob/master/app/controllers/user.php 这个函数最上面加入`return false`; 2 、合理一点的, `if ($this->auth->is_login()) {` 这行的上面加上: show_message('注册已经关闭', site_url()); return; |
5 raincious 2016-07-16 18:34:39 +08:00 @raincious 这个方法嗯: https://github.com/startbbs/startbbs/blob/master/app/controllers/user.php#L55 > public function register () |
![]() | 6 uuuing 2016-07-16 18:42:01 +08:00 直接注释掉相关代码,不过这样比较粗鲁,可以在判断的地方加入 $ok_msg = "论坛以关闭注册" ; (根据源码来。 我没看源码) 就好了。。 |
7 lianghudou 2016-07-16 18:50:35 +08:00 问问题的功夫都把代码改好了 |
![]() | 8 justjavac 2016-07-16 19:43:44 +08:00 via Android 换 Flarum 吧 |