]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
add configuration option to disable registration
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Mon, 2 Nov 2009 09:40:00 +0000 (09:40 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Mon, 2 Nov 2009 09:40:00 +0000 (09:40 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@501 b3834d28-1941-0410-a4f8-b48e95affb8f

data/config.default.php
data/templates/toolbar.inc.php
www/register.php

index 4a17503cc47b6ee8df3dd59101aa91aecc1ea1d2..76c8856d4bc471cc976781f437b8e43c39eb72dd 100644 (file)
@@ -253,6 +253,13 @@ $antispamQuestion = 'name of this application';
  */
 $antispamAnswer = 'semanticscuttle';
 
+/**
+ * Enable or disable user registration
+ *
+ * @var boolean
+ */
+$enableRegistration = true;
+
 
 
 /***************************************************
index fa7170af7a357169fb7af6f3b1f128d6d66957ff..0d9bf49dde61301e292da348bd01de86260a8adf 100644 (file)
@@ -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
index 379dec48a4ea31b6a7b46f0695fecf947631be9b..5a1257394142f84c192d37d52cb3f0718af0fe89 100644 (file)
@@ -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