From 4496b56e3392ba8183c0e1764557d51a8633e7ca Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 2 Feb 2016 20:31:29 -0500 Subject: Add admin setting 'allowPublicSignup' This setting will be used to decide if the app should allow unauthenticated users to create their own user accounts or if an admin must create them. --- app/class/setting.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/class/setting.class.php') diff --git a/app/class/setting.class.php b/app/class/setting.class.php index b48f241..e3ef7f1 100644 --- a/app/class/setting.class.php +++ b/app/class/setting.class.php @@ -40,6 +40,19 @@ class Setting extends Framework $db->query($query); } + + /* + * Should the app allow the public to signup their own accounts with Scrott? + */ + static function allowPublicSignup($value = null) + { + $opt = "allowPublicSignup"; + + if ($value != null) + self::setValue($opt, $value); + + return self::getValue($opt); + } } ?> -- cgit v1.2.3