]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Closes #2653 users are logged in on registration and login exceptions are caught...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 19 Nov 2010 11:53:19 +0000 (11:53 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 19 Nov 2010 11:53:19 +0000 (11:53 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7345 36083f99-b078-4883-b0ff-0f9b5a30f544

actions/register.php

index 52176c5dec1db48446b70ea093bc7e8e6c1e8b81..1a0954e3b5164b0381ddb353e5e61205e287dec4 100644 (file)
@@ -54,6 +54,14 @@ if ($CONFIG->allow_registration) {
 
                        system_message(elgg_echo("registerok", array($CONFIG->sitename)));
 
+                       // if exception thrown, this probably means there is a validation
+                       // plugin that has disabled the user
+                       try {
+                               login($new_user);
+                       } catch (LoginException $e) {
+                               // do nothing
+                       }
+
                        // Forward on success, assume everything else is an error...
                        forward();
                } else {