aboutsummaryrefslogtreecommitdiff
path: root/actions/email/confirm.php
diff options
context:
space:
mode:
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