1
0
mirror of https://github.com/flarum/core.git synced 2025-10-17 17:56:14 +02:00

Allow/disallow signup per config

This commit is contained in:
Toby Zerner
2015-08-05 18:19:26 +09:30
parent 023eff95e3
commit 4c06e78b57
4 changed files with 30 additions and 14 deletions

View File

@@ -30,7 +30,8 @@ class ForumSerializer extends Serializer
'welcomeMessage' => Core::config('welcome_message'),
'themePrimaryColor' => Core::config('theme_primary_color'),
'canView' => $forum->can($this->actor, 'view'),
'canStartDiscussion' => $forum->can($this->actor, 'startDiscussion')
'canStartDiscussion' => $forum->can($this->actor, 'startDiscussion'),
'allowSignUp' => (bool) Core::config('allow_sign_up')
];
if ($this->actor->isAdmin()) {