aboutsummaryrefslogtreecommitdiff
path: root/actions/email/confirm.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-25 19:21:21 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-25 19:21:21 +0000
commit401fd957b30219a610014d4236de35b6220fd310 (patch)
tree072d7ef4b88000ff20df90724e4f798bf5448b74 /actions/email/confirm.php
parentfb24a60da5ea1627c8336e387217bd6ca2b45f74 (diff)
downloadelgg-401fd957b30219a610014d4236de35b6220fd310.tar.gz
elgg-401fd957b30219a610014d4236de35b6220fd310.tar.bz2
Closes #79: Email confirmation on registration & email change
http://trac.elgg.org/elgg/ticket/79 git-svn-id: https://code.elgg.org/elgg/trunk@1137 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/email/confirm.php')
-rw-r--r--actions/email/confirm.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/actions/email/confirm.php b/actions/email/confirm.php
index d967f7c1e..8ba54347e 100644
--- a/actions/email/confirm.php
+++ b/actions/email/confirm.php
@@ -11,9 +11,7 @@
*/
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
- // Ensure we are logged in
- gatekeeper();
+ global $CONFIG;
// Get user id
$user_guid = (int)get_input('u');
@@ -24,9 +22,13 @@
if ( ($code) && ($user) )
{
- if (validate_email($user_guid, $code))
+ if (validate_email($user_guid, $code)) {
system_message(elgg_echo('email:confirm:success'));
- else
+
+ $user = get_entity($user_guid);
+ notify_user($user_guid, $CONFIG->site->guid, elgg_echo('email:validate:success:subject'), sprintf(elgg_echo('email:validate:success:body'), $user->username), NULL, 'email');
+
+ } else
system_message(elgg_echo('email:confirm:fail'));
}
else