summaryrefslogtreecommitdiffstats
path: root/activate.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-02 23:22:34 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-02 23:22:34 +0000
commita93768353184965727bebde84a7d970beaa8d4bb (patch)
treeed03d5f370174b28bf93b0bf1091602fd925cc44 /activate.php
parent54d83e0796666854704298d17398df653877c08c (diff)
downloadampache-a93768353184965727bebde84a7d970beaa8d4bb.tar.gz
ampache-a93768353184965727bebde84a7d970beaa8d4bb.tar.bz2
ampache-a93768353184965727bebde84a7d970beaa8d4bb.zip
patched up registration a little bit
Diffstat (limited to 'activate.php')
-rw-r--r--activate.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/activate.php b/activate.php
index 4aeb00da..8508b2c9 100644
--- a/activate.php
+++ b/activate.php
@@ -22,7 +22,7 @@
$no_session = true;
require_once( "modules/init.php" );
-if(conf('demo_mode')) {
+if(!conf('allow_public_registration') || conf('demo_mode')) {
access_denied();
}
@@ -42,6 +42,12 @@ if (!$val1){
echo "</body></html>";
break;
}
+if ($val1 != $validation) {
+ $GLOBALS['error']->add_error('validation_failed',_("The validation key used isn't correct."));
+ $GLOBALS['error']->print_error('validation_failed');
+ echo "</body></html>";
+ break;
+ }
$activate = $GLOBALS['user']->activate_user($username);
show_confirmation('User activated','This User ID is activated and can be used','/login.php');
echo "</body></html>";