From b5ee21aa65a2f380e3b99ff5ea6ced48c1cb720e Mon Sep 17 00:00:00 2001
From: Adrian Lang <lang@cosmocode.de>
Date: Tue, 15 Dec 2009 10:54:30 +0100
Subject: [PATCH] Provide AFTER event for AUTH_LOGIN_CHECK

Ignore-this: 804d0837b9a04e4f82e6b54765f453cf

darcs-hash:20091215095430-e4919-19c61854c27fdade90caeed035445ee3396b0095.gz
---
 inc/auth.php | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/inc/auth.php b/inc/auth.php
index 50c5f17ed..c18104487 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -90,13 +90,7 @@ if($conf['useacl']){
                     'sticky'   => $_REQUEST['r'],
                     'silent'   => $_REQUEST['http_credentials'],
                     );
-            $evt = new Doku_Event('AUTH_LOGIN_CHECK',$evdata);
-            if($evt->advise_before()){
-                auth_login($evdata['user'],
-                           $evdata['password'],
-                           $evdata['sticky'],
-                           $evdata['silent']);
-            }
+            trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper');
         }
     }
 
@@ -114,6 +108,13 @@ if($conf['useacl']){
     }
 }
 
+function auth_login_wrapper($evdata) {
+    return auth_login($evdata['user'],
+                      $evdata['password'],
+                      $evdata['sticky'],
+                      $evdata['silent']);
+}
+
 /**
  * This tries to login the user based on the sent auth credentials
  *
-- 
GitLab