summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-09-21 11:53:17 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-09-21 11:53:17 +0200
commit2ed38036a53a489d2fcadc46ce601f8c876fca31 (patch)
treee8f36697d9300a874957b6a72c821f36b25f4c85 /inc/auth.php
parentf036cff4fde59f0265f6123f6faf92cb8ba8bb26 (diff)
downloadrpg-2ed38036a53a489d2fcadc46ce601f8c876fca31.tar.gz
rpg-2ed38036a53a489d2fcadc46ce601f8c876fca31.tar.bz2
consolidate more notification code in subscription class
This is untested and probably broken currently
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/inc/auth.php b/inc/auth.php
index cedfdee36..3fb937613 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -778,23 +778,18 @@ function register() {
return false;
}
- // create substitutions for use in notification email
- $substitutions = array(
- 'NEWUSER' => $_POST['login'],
- 'NEWNAME' => $_POST['fullname'],
- 'NEWEMAIL' => $_POST['email'],
- );
+ $subscription = new Subscription();
if(!$conf['autopasswd']) {
msg($lang['regsuccess2'], 1);
- notify('', 'register', '', $_POST['login'], false, $substitutions);
+ $subscription->send_register($_POST['login'], $_POST['fullname'], $_POST['email']);
return true;
}
// autogenerated password? then send him the password
if(auth_sendPassword($_POST['login'], $pass)) {
msg($lang['regsuccess'], 1);
- notify('', 'register', '', $_POST['login'], false, $substitutions);
+ $subscription->send_register($_POST['login'], $_POST['fullname'], $_POST['email']);
return true;
} else {
msg($lang['regmailfail'], -1);