Skip to content

Commit

Permalink
Merge a62410d into 78a3b97
Browse files Browse the repository at this point in the history
  • Loading branch information
hypeJunction committed Sep 30, 2016
2 parents 78a3b97 + a62410d commit b058874
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion actions/register.php
Expand Up @@ -63,8 +63,22 @@
// plugin that has disabled the user
try {
login($new_user);
// set forward url
$session = elgg_get_session();
if ($session->has('last_forward_from')) {
$forward_url = $session->get('last_forward_from');
$forward_source = 'last_forward_from';
} else {
// forward to main index page
$forward_url = '';
$forward_source = null;
}
$params = array('user' => $new_user, 'source' => $forward_source);
$forward_url = elgg_trigger_plugin_hook('login:forward', 'user', $params, $forward_url);
forward($forward_url);
} catch (LoginException $e) {
// do nothing
register_error($e->getMessage());
forward(REFERER);
}
}

Expand Down

0 comments on commit b058874

Please sign in to comment.