mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Fixes #1684 - Issue logging in with email address and strong encryption active.
This commit is contained in:
@@ -430,7 +430,7 @@ class userlogin
|
|||||||
$log = e107::getAdminLog();
|
$log = e107::getAdminLog();
|
||||||
|
|
||||||
if($forceLogin === 'provider') return true;
|
if($forceLogin === 'provider') return true;
|
||||||
|
/*
|
||||||
if ($this->lookEmail && vartrue($pref['passwordEncoding']))
|
if ($this->lookEmail && vartrue($pref['passwordEncoding']))
|
||||||
{
|
{
|
||||||
$tmp = e107::getArrayStorage()->unserialize($this->userData['user_prefs']);
|
$tmp = e107::getArrayStorage()->unserialize($this->userData['user_prefs']);
|
||||||
@@ -442,7 +442,7 @@ class userlogin
|
|||||||
{
|
{
|
||||||
$requiredPassword = $this->userData['user_password'];
|
$requiredPassword = $this->userData['user_password'];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Now check password
|
// Now check password
|
||||||
if ($forceLogin)
|
if ($forceLogin)
|
||||||
@@ -460,7 +460,7 @@ class userlogin
|
|||||||
if ((($pref['password_CHAP'] > 0) && ($response && $gotChallenge) && ($response != $session->get('challenge'))) || ($pref['password_CHAP'] == 2))
|
if ((($pref['password_CHAP'] > 0) && ($response && $gotChallenge) && ($response != $session->get('challenge'))) || ($pref['password_CHAP'] == 2))
|
||||||
{ // Verify using CHAP
|
{ // Verify using CHAP
|
||||||
//$this->e107->admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","CHAP login",$aLogVal, FALSE, LOG_TO_ROLLING);
|
//$this->e107->admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","CHAP login",$aLogVal, FALSE, LOG_TO_ROLLING);
|
||||||
if (($pass_result = $this->userMethods->CheckCHAP($session->get('challenge'), $response, $username, $requiredPassword)) === PASSWORD_INVALID)
|
if (($pass_result = $this->userMethods->CheckCHAP($session->get('challenge'), $response, $username, $this->userData['user_password'])) === PASSWORD_INVALID)
|
||||||
{
|
{
|
||||||
return $this->invalidLogin($username,LOGIN_CHAP_FAIL);
|
return $this->invalidLogin($username,LOGIN_CHAP_FAIL);
|
||||||
}
|
}
|
||||||
@@ -474,17 +474,17 @@ class userlogin
|
|||||||
'type' => (($this->lookEmail) ? 'email' : 'userlogin'),
|
'type' => (($this->lookEmail) ? 'email' : 'userlogin'),
|
||||||
'login_name' => $login_name,
|
'login_name' => $login_name,
|
||||||
'userpass' => $userpass,
|
'userpass' => $userpass,
|
||||||
'pwdHash' => $requiredPassword
|
'pwdHash' => $this->userData['user_password']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (($pass_result = $this->userMethods->CheckPassword($userpass, $login_name, $requiredPassword)) === PASSWORD_INVALID)
|
if (($pass_result = $this->userMethods->CheckPassword($userpass, $login_name, $this->userData['user_password'])) === PASSWORD_INVALID)
|
||||||
{
|
{
|
||||||
$auditLog['result'] = $pass_result;
|
$auditLog['result'] = intval($pass_result);
|
||||||
$log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']);
|
$log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']);
|
||||||
return $this->invalidLogin($username,LOGIN_BAD_PW);
|
return $this->invalidLogin($username,LOGIN_BAD_PW);
|
||||||
}
|
}
|
||||||
|
|
||||||
$auditLog['result'] = $pass_result;
|
$auditLog['result'] = intval($pass_result);
|
||||||
|
|
||||||
$log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']);
|
$log->user_audit(USER_AUDIT_LOGIN, $auditLog, $this->userData['user_id'], $this->userData['user_name']);
|
||||||
}
|
}
|
||||||
|
@@ -28,8 +28,8 @@ define("LAN_AUDIT_LOG_009", "");
|
|||||||
define("LAN_AUDIT_LOG_010", "User data changed by admin");
|
define("LAN_AUDIT_LOG_010", "User data changed by admin");
|
||||||
define("LAN_AUDIT_LOG_011", "User signed up");
|
define("LAN_AUDIT_LOG_011", "User signed up");
|
||||||
define("LAN_AUDIT_LOG_012", "User confirmed registration");
|
define("LAN_AUDIT_LOG_012", "User confirmed registration");
|
||||||
define("LAN_AUDIT_LOG_013", "User logged in");
|
define("LAN_AUDIT_LOG_013", "User login");
|
||||||
define("LAN_AUDIT_LOG_014", "User logged out");
|
define("LAN_AUDIT_LOG_014", "User logout");
|
||||||
define("LAN_AUDIT_LOG_015", "User changed display name");
|
define("LAN_AUDIT_LOG_015", "User changed display name");
|
||||||
define("LAN_AUDIT_LOG_016", "User changed password");
|
define("LAN_AUDIT_LOG_016", "User changed password");
|
||||||
define("LAN_AUDIT_LOG_017", "User changed email address");
|
define("LAN_AUDIT_LOG_017", "User changed email address");
|
||||||
|
Reference in New Issue
Block a user