registration setting
This commit is contained in:
parent
0bde1a034b
commit
04e036978c
4 changed files with 39 additions and 23 deletions
|
|
@ -172,6 +172,15 @@ class CmdUnconnectedCreate(COMMAND_DEFAULT_CLASS):
|
|||
locks = "cmd:all()"
|
||||
arg_regex = r"\s.*?|$"
|
||||
|
||||
def at_pre_cmd(self):
|
||||
"""Verify that account creation is enabled."""
|
||||
if not settings.REGISTER_ENABLED:
|
||||
# truthy return cancels the command
|
||||
self.msg("Registration is currently disabled.")
|
||||
return True
|
||||
|
||||
return super().at_pre_cmd()
|
||||
|
||||
def func(self):
|
||||
"""Do checks and create account"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue