Fix fatal error.

1.10.x
Julio Montoya 9 years ago
parent b3a91ac99a
commit 4c6339c741
  1. 10
      main/inc/local.inc.php

@ -316,8 +316,16 @@ if (!empty($_SESSION['_user']['user_id']) && !($login || $logout)) {
if ($uData['auth_source'] == PLATFORM_AUTH_SOURCE ||
$uData['auth_source'] == CAS_AUTH_SOURCE
) {
$validPassword = false;
$user = $userManager->findUserByUsername($login);
$validPassword = UserManager::isPasswordValid($password, $user);
if ($user) {
$validPassword = UserManager::isPasswordValid(
$password,
$user
);
}
// The authentication of this user is managed by Chamilo itself
//$password = api_get_encrypted_password(trim(stripslashes($password)));

Loading…
Cancel
Save