From f94f4f51ceb4f091293df71d266b54e954e0caef Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 11 May 2017 12:59:03 +0200
Subject: [PATCH] Fixed #4641 PHP Fatal error: Using $this when not in object
 context

---
 interface/web/login/index.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/web/login/index.php b/interface/web/login/index.php
index c747c4e8ac..0f7a53f3e3 100644
--- a/interface/web/login/index.php
+++ b/interface/web/login/index.php
@@ -298,7 +298,7 @@ if(count($_POST) > 0) {
 				$error = $app->lng('error_user_password_incorrect');
 				if($app->db->errorMessage != '') $error .= '<br />'.$app->db->errorMessage != '';
 
-				$app->plugin->raiseEvent('login_failed', $this);
+				$app->plugin->raiseEvent('login_failed', $username);
 				//* Save failed login message to var
 				$authlog = 'Failed login for user \''. $username .'\' from '. long2ip($ip) .' at '. date('Y-m-d H:i:s');
 				$authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a');
@@ -309,7 +309,7 @@ if(count($_POST) > 0) {
 		} else {
 		//* Username or password empty
 		if($error == '') $error = $app->lng('error_user_password_empty');
-			$app->plugin->raiseEvent('login_empty', $this);
+			$app->plugin->raiseEvent('login_empty', $username);
 	}
 }
 
-- 
GitLab