aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/config.default.php7
-rw-r--r--data/templates/toolbar.inc.php2
-rw-r--r--www/register.php6
3 files changed, 15 insertions, 0 deletions
diff --git a/data/config.default.php b/data/config.default.php
index 4a17503..76c8856 100644
--- a/data/config.default.php
+++ b/data/config.default.php
@@ -253,6 +253,13 @@ $antispamQuestion = 'name of this application';
*/
$antispamAnswer = 'semanticscuttle';
+/**
+ * Enable or disable user registration
+ *
+ * @var boolean
+ */
+$enableRegistration = true;
+
/***************************************************
diff --git a/data/templates/toolbar.inc.php b/data/templates/toolbar.inc.php
index fa7170a..0d9bf49 100644
--- a/data/templates/toolbar.inc.php
+++ b/data/templates/toolbar.inc.php
@@ -27,7 +27,9 @@ if ($userservice->isLoggedOn()) {
<li><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a></li>
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
<li class="access"><a href="<?php echo createURL('login'); ?>"><?php echo T_('Log In'); ?></a></li>
+ <?php if ($GLOBALS['enableRegistration']) { ?>
<li class="access"><a href="<?php echo createURL('register'); ?>"><?php echo T_('Register'); ?></a></li>
+ <?php } ?>
</ul>
<?php
diff --git a/www/register.php b/www/register.php
index 379dec4..5a12573 100644
--- a/www/register.php
+++ b/www/register.php
@@ -21,6 +21,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once '../src/SemanticScuttle/header.php';
+if (!$GLOBALS['enableRegistration']) {
+ header('HTTP/1.0 501 Not implemented');
+ echo 'Registration is disabled';
+ exit(1);
+}
+
/* Service creation: only useful services are created */
// No specific services