From 401fd957b30219a610014d4236de35b6220fd310 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 25 Jun 2008 19:21:21 +0000 Subject: 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 --- actions/email/confirm.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'actions/email/confirm.php') 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 -- cgit v1.2.3