]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Actually delete user when registration fails
authorhellekin <hellekin@cepheide.org>
Mon, 4 Mar 2013 09:59:41 +0000 (06:59 -0300)
committercash <cash.costello@gmail.com>
Wed, 6 Mar 2013 19:46:01 +0000 (14:46 -0500)
actions/register.php

index 810ceaf274d0f2a8ba22d0b520f7acac77d90829..73926232ceb8d13ad4f699c810b6a59e18267ba0 100644 (file)
@@ -45,7 +45,9 @@ if (elgg_get_config('allow_registration')) {
 
                        // @todo should registration be allowed no matter what the plugins return?
                        if (!elgg_trigger_plugin_hook('register', 'user', $params, TRUE)) {
+                               $ia = elgg_set_ignore_access(true);
                                $new_user->delete();
+                               elgg_set_ignore_access($ia);
                                // @todo this is a generic messages. We could have plugins
                                // throw a RegistrationException, but that is very odd
                                // for the plugin hooks system.