From e40468a7aff9a445a5352b509044cb6a3597a341 Mon Sep 17 00:00:00 2001 From: Sem Date: Sat, 10 Nov 2012 03:11:44 +0100 Subject: Fixes #4911. Cleaning register form after last check. --- actions/register.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/actions/register.php b/actions/register.php index f23d5b381..810ceaf27 100644 --- a/actions/register.php +++ b/actions/register.php @@ -30,8 +30,6 @@ if (elgg_get_config('allow_registration')) { $guid = register_user($username, $password, $name, $email, false, $friend_guid, $invitecode); if ($guid) { - elgg_clear_sticky_form('register'); - $new_user = get_entity($guid); // allow plugins to respond to self registration @@ -54,6 +52,7 @@ if (elgg_get_config('allow_registration')) { throw new RegistrationException(elgg_echo('registerbad')); } + elgg_clear_sticky_form('register'); system_message(elgg_echo("registerok", array(elgg_get_site_entity()->name))); // if exception thrown, this probably means there is a validation @@ -76,4 +75,4 @@ if (elgg_get_config('allow_registration')) { register_error(elgg_echo('registerdisabled')); } -forward(REFERER); \ No newline at end of file +forward(REFERER); -- cgit v1.2.3