git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit b763bbb1 authored by Jonas Haraldsson's avatar Jonas Haraldsson

Disable registration

Registraton can now be disabled by setting
$registration_disabled = true;
in config.php
parent 9b544ccf
......@@ -28,6 +28,10 @@ if ($logged_in == true) {
exit();
}
if ($registration_disabled == true) {
displayError("Registration disabled", "Registration has been disabled by the site owner, sorry!");
}
function sendEmail($to, $subject, $message) {
mail($to, $subject, $message);
}
......
......@@ -92,6 +92,7 @@ $smarty->assign('this_page_absolute',
. (empty($_SERVER['HOST']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HOST'])
. (($_SERVER['SERVER_PORT'] == 80) ? '' : (':' . $_SERVER['SERVER_PORT']))
. $_SERVER['REQUEST_URI']);
$smarty->assign('registration_disabled', $registration_disabled);
if (isset($logged_in) && $logged_in) {
$smarty->assign('logged_in', true);
......
{include file='mini-header.tpl'}
<h2>{t}Login{/t}</h2>
{if !($registration_disabled)}
<h3>{t}Need an account?{/t} <a href="{$base_url}/register.php">{t}Register now!{/t}</a></h3>
{/if}
{if isset($errors)}
<p id='errors'>{$errors}</p>
{/if}
......
......@@ -8,6 +8,8 @@
<li><a href="{$base_url}/login.php">{t}Log in{/t}</a></li>
<li><a href="{$base_url}/listen.php">{t}Listen{/t}</a></li>
<li><a href="{$base_url}/popular-page.php">{t}Popular{/t}</a></li>
{if !($registration_disabled)}
<li><a href="{$base_url}/register.php">{t}Sign up{/t}</a></li>
{/if}
{/if}
</ul>
<p><a href="/">{t}Back to site{/t}</a> | <a href="{$base_url}/register.php">{t}Register{/t}</a> | <a href="{$base_url}/login.php">{t}Login{/t}</a> | <a href="{$base_url}/reset.php">{t}Lost password{/t}</a></p>
<p><a href="/">{t}Back to site{/t}</a> | {if !($registration_disabled)}<a href="{$base_url}/register.php">{t}Register{/t}</a> |{/if} <a href="{$base_url}/login.php">{t}Login{/t}</a> | <a href="{$base_url}/reset.php">{t}Lost password{/t}</a></p>
</body>
</html>
......@@ -16,12 +16,16 @@
{else}
{if !($registration_disabled)}
<p class="c">{t site=$site_name}%1 allows you to share your listening habits and discover new music.{/t}</p>
<ul id="buttons sign-up">
<li><a href="{$base_url}/register.php">{t}Sign up now{/t}</a></li>
</ul>
{/if}
{/if}
{if !($registration_disabled)}
<p class="c artist-signup">Are you an artist? <a href="{$base_url}/artist-signup.php">Sign up now</a> to start sharing your music with our listeners!</p>
{/if}
{include file='footer.tpl'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment