]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix auth plugin autoregistration issue.
authorCraig Andrews <candrews@integralblue.com>
Tue, 5 Jan 2010 18:42:15 +0000 (13:42 -0500)
committerCraig Andrews <candrews@integralblue.com>
Tue, 5 Jan 2010 18:42:15 +0000 (13:42 -0500)
plugins/Authentication/AuthenticationPlugin.php

index 75e8d2b766cea3f9f49e866b8ead912a95345767..07f14035da29ff45275f9e956bce1c50e3cd457b 100644 (file)
@@ -146,7 +146,10 @@ abstract class AuthenticationPlugin extends Plugin
             }else{
                 $authenticated = $this->checkPassword($nickname, $password);
                 if($authenticated){
-                    if(Event::handle('AutoRegister', array($nickname, $this->provider_name, &$authenticatedUser))){
+                    if(! Event::handle('AutoRegister', array($nickname, $this->provider_name, &$authenticatedUser))){
+                        //unlike most Event::handle lines of code, this one has a ! (not)
+                        //we want to do this if the event *was* handled - this isn't a "default" implementation
+                        //like most code of this form.
                         if($authenticatedUser){
                             return false;
                         }