Skip to content

Commit

Permalink
fix(uservalidationbyemail): only forward to emailsent page if email sent
Browse files Browse the repository at this point in the history
fixes #7788
  • Loading branch information
jdalsem committed Feb 19, 2015
1 parent 256df5b commit 7d8cd3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mod/uservalidationbyemail/start.php
Expand Up @@ -117,7 +117,11 @@ function uservalidationbyemail_disable_new_user($hook, $type, $value, $params) {
function uservalidationbyemail_after_registration_url($hook, $type, $value, $params) {
$url = elgg_extract('current_url', $params);
if ($url == elgg_get_site_url() . 'action/register') {
return elgg_get_site_url() . 'uservalidationbyemail/emailsent';
$session = elgg_get_session();
$email = $session->get('emailsent', '');
if ($email) {
return elgg_get_site_url() . 'uservalidationbyemail/emailsent';
}
}
}

Expand Down

0 comments on commit 7d8cd3b

Please sign in to comment.