From e931dff9f8d6ebcf7298dc15ad5557e0eb578ccc Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Sun, 6 Jun 2010 04:29:54 +0000 Subject: [PATCH] Updated login event for BC with 0.7. --- e107_admin/auth.php | 2 +- e107_handlers/login.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e107_admin/auth.php b/e107_admin/auth.php index 0782c9277..d6401f757 100644 --- a/e107_admin/auth.php +++ b/e107_admin/auth.php @@ -114,7 +114,7 @@ else e107::getAdminLog()->user_audit(USER_AUDIT_LOGIN, '', $user_id, $user_name); } - $edata_li = array("user_id"=>$row['user_id'], "user_name"=>$row['user_name'], 'class_list'=>implode(',', $class_list)); + $edata_li = array("user_id"=>$row['user_id'], "user_name"=>$row['user_name'], 'class_list'=>implode(',', $class_list), 'user_admin'=> $row['user_admin']); e107::getEvent()->trigger("login", $edata_li); diff --git a/e107_handlers/login.php b/e107_handlers/login.php index e1d151310..4c0175477 100644 --- a/e107_handlers/login.php +++ b/e107_handlers/login.php @@ -194,6 +194,7 @@ class userlogin $user_id = $this->userData['user_id']; $user_name = $this->userData['user_name']; $user_xup = $this->userData['user_xup']; + $user_admin = $this->userData['user_admin']; /* restrict more than one person logging in using same us/pw */ if($pref['disallowMultiLogin']) @@ -225,8 +226,8 @@ class userlogin $this->e107->admin_log->user_audit(USER_AUDIT_LOGIN,'', $user_id,$user_name); } - $edata_li = array('user_id' => $user_id, 'user_name' => $username, 'class_list' => implode(',',$class_list), 'remember_me' => $autologin); - $e_event->trigger("login", $edata_li); + $edata_li = array('user_id' => $user_id, 'user_name' => $username, 'class_list' => implode(',',$class_list), 'remember_me' => $autologin, 'user_admin'=>$user_admin); + e107::getEvent()->trigger("login", $edata_li); if($_E107['cli']) {