summaryrefslogtreecommitdiffstats
path: root/register.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-02 16:40:03 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-02 16:40:03 +0000
commit552c3cedd78263ce385d0ac47b02ccd22ea474b3 (patch)
tree7042da2e17c73afad01d7004884dd1d903cff293 /register.php
parent66e0b8ea9dd675a778a5c5777cce547887b2720c (diff)
downloadampache-552c3cedd78263ce385d0ac47b02ccd22ea474b3.tar.gz
ampache-552c3cedd78263ce385d0ac47b02ccd22ea474b3.tar.bz2
ampache-552c3cedd78263ce385d0ac47b02ccd22ea474b3.zip
fixed registration page, and simplifed its logic
Diffstat (limited to 'register.php')
-rw-r--r--register.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/register.php b/register.php
index d280a9fc..c0a31127 100644
--- a/register.php
+++ b/register.php
@@ -45,6 +45,11 @@ if (Config::get('captcha_public_reg')) {
/* Start switch based on action passed */
switch ($_REQUEST['action']) {
+ case 'validate':
+ $username = scrub_in($_GET['username']);
+ $validation = scrub_in($_GET['auth']);
+ require_once Config::get('prefix') . '/templates/show_user_activate.inc.php';
+ break;
case 'add_user':
/**
* User information has been entered
@@ -156,14 +161,14 @@ switch ($_REQUEST['action']) {
}
$client = new User($new_user);
- $validation = str_rand(20);
+ $validation = md5(uniqid(rand(), true));
$client->update_validation($validation);
$message = 'Your account has been created. However, this application requires account activation.' .
' An activation key has been sent to the e-mail address you provided. ' .
'Please check your e-mail for further information';
- send_confirmation($username, $fullname, $email, $pass1, $validation);
+ Registration::send_confirmation($username, $fullname, $email, $pass1, $validation);
?>
<link rel="stylesheet" href="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/templates/default.css" type="text/css" />
<?php