From f3a76bbcb71bcb3c389e55d18a163fa9927bcc06 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 5 Jan 2010 13:42:15 -0500 Subject: Fix auth plugin autoregistration issue. --- plugins/Authentication/AuthenticationPlugin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/Authentication/AuthenticationPlugin.php b/plugins/Authentication/AuthenticationPlugin.php index 75e8d2b76..07f14035d 100644 --- a/plugins/Authentication/AuthenticationPlugin.php +++ b/plugins/Authentication/AuthenticationPlugin.php @@ -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; } -- cgit v1.2.3-54-g00ecf