aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/email/confirm.php12
-rw-r--r--actions/register.php2
2 files changed, 9 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
diff --git a/actions/register.php b/actions/register.php
index dd573aa77..88cbf0348 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -10,6 +10,8 @@
* @copyright Curverider Ltd 2008
* @link http://elgg.org/
*/
+
+ require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
// Get variables
$username = get_input('username');