From fed701473cbe6d9e2003c5806e3cf013b9187e66 Mon Sep 17 00:00:00 2001
From: Mike Holisky <mholisky@mcad.edu>
Date: Thu, 27 Apr 2017 13:23:25 -0500
Subject: [PATCH] Add REMOTE_ADDR to successful auth and user name to
 unsuccessful log message.

---
 modules/core/lib/Auth/UserPassBase.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/core/lib/Auth/UserPassBase.php b/modules/core/lib/Auth/UserPassBase.php
index e688a70dd..128ab4836 100644
--- a/modules/core/lib/Auth/UserPassBase.php
+++ b/modules/core/lib/Auth/UserPassBase.php
@@ -252,11 +252,11 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source {
 		try {
 			$attributes = $source->login($username, $password);
 		} catch (Exception $e) {
-			SimpleSAML\Logger::stats('Unsuccessful login attempt from '.$_SERVER['REMOTE_ADDR'].'.');
+			SimpleSAML\Logger::stats('User \''.$username.'\' Unsuccessful login attempt from '.$_SERVER['REMOTE_ADDR']);
 			throw $e;
 		}
 
-		SimpleSAML\Logger::stats('User \''.$username.'\' has been successfully authenticated.');
+		SimpleSAML\Logger::stats('User \''.$username.'\' Successfully authenticated from '.$_SERVER['REMOTE_ADDR']);
 
 		/* Save the attributes we received from the login-function in the $state-array. */
 		assert('is_array($attributes)');
-- 
GitLab