From e2fc90e8a38447793a6530e09fbaae47559fed46 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 6 Jun 2016 12:48:26 -0700 Subject: [PATCH] Extra logging with user-login audit is enabled. --- e107_handlers/login.php | 13 ++++++++++++- e107_handlers/user_handler.php | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/e107_handlers/login.php b/e107_handlers/login.php index 5350a4892..a4afd2341 100644 --- a/e107_handlers/login.php +++ b/e107_handlers/login.php @@ -449,7 +449,18 @@ class userlogin else { // Plaintext password - //$this->e107->admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","Plaintext login",$aLogVal, FALSE,LOG_TO_ROLLING); + $auditLog = array( + + 'lookEmail' => $this->lookEmail, + 'user_loginname' => $this->userData['user_loginname'], + 'userpass' => $userpass, + 'username' => $username, + 'pwdHash' => $requiredPassword + + ); + + e107::getAdminLog()->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']); + if (($pass_result = $this->userMethods->CheckPassword($userpass,($this->lookEmail ? $this->userData['user_loginname'] : $username),$requiredPassword)) === PASSWORD_INVALID) { return $this->invalidLogin($username,LOGIN_BAD_PW); diff --git a/e107_handlers/user_handler.php b/e107_handlers/user_handler.php index e0e8ec42c..31879f80a 100644 --- a/e107_handlers/user_handler.php +++ b/e107_handlers/user_handler.php @@ -180,7 +180,7 @@ class UserHandler * @param string $login_name - string used to log in (could actually be email address) * @param string $stored_hash - required value for password to match * - * @return PASSWORD_INVALID|PASSWORD_VALID|string + * @return string PASSWORD_INVALID|PASSWORD_VALID|string * PASSWORD_INVALID if no match * PASSWORD_VALID if valid password * Return a new hash to store if valid password but non-preferred encoding