summaryrefslogtreecommitdiffstats
path: root/pages/login.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-03-10 16:05:42 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-03-10 16:05:42 -0700
commit0de9fd4ce81392508ce9648e2ae279912d7f9ed5 (patch)
treed2d5e7ba8d560fa0a023e8481870e5aa78cf9f17 /pages/login.php
parentde879e6edc1db733481032ab16e530c8892a4e08 (diff)
downloadpathery-0de9fd4ce81392508ce9648e2ae279912d7f9ed5.tar.xz
New user-emails.
Diffstat (limited to 'pages/login.php')
-rw-r--r--pages/login.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/pages/login.php b/pages/login.php
index 4858e57..f3510c0 100644
--- a/pages/login.php
+++ b/pages/login.php
@@ -138,6 +138,7 @@ try {
}
include_once('includes/chats.php');
addchat(-1, "New user registered: \"$display\"");
+ sendNewUserEmail($userID, $email, $display, $dateJoined);
}
//If 'remember me' use this for cookie password
//$_SESSION['Passcode'] = MD5($Password.$Pepper.$Username);
@@ -175,6 +176,25 @@ try {
echo $e->getMessage();
}
+function sendNewUserEmail($userID, $email, $display, $dateJoined) {
+ global $mydomain;
+ include_once('./includes/emails.php');
+ $emailBody = "Thank you for signing in to Pathery!
+
+Questions or feedback? Please reply to this email!
+
+Useful Links:
+Change your display name: $mydomain"."cp
+View your achievements and stats: $mydomain"."achievements?id="."$userID
+
+Happy Pathing,
+
+ The Pathery Team
+";
+ $emailSubject = 'Welcome to Pathery.com!';
+ QueueEmail(0, $email, $emailSubject, $emailBody, 5, true);
+}
+
function throwLoginError($data, $explination) {
$randCode = rand(10000, 99999);
$errortext = "<br />Error; $explination \n