Skip to content
Snippets Groups Projects
Commit fed70147 authored by Mike Holisky's avatar Mike Holisky
Browse files

Add REMOTE_ADDR to successful auth and user name to unsuccessful log message.

parent c2810755
No related branches found
No related tags found
No related merge requests found
...@@ -252,11 +252,11 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source { ...@@ -252,11 +252,11 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source {
try { try {
$attributes = $source->login($username, $password); $attributes = $source->login($username, $password);
} catch (Exception $e) { } 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; 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. */ /* Save the attributes we received from the login-function in the $state-array. */
assert('is_array($attributes)'); assert('is_array($attributes)');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment