Internal: Add additional check on alternative authentication source file to avoid logging useless warnings

pull/4990/head
Yannick Warnier 2 years ago
parent 7ba8416efa
commit 12655c3ff7
  1. 20
      main/inc/local.inc.php

@ -852,15 +852,17 @@ if (!empty($_SESSION['_user']['user_id']) && !($login || $logout)) {
if (!empty($thisAuthSource['login']) && file_exists($thisAuthSource['login'])) {
include_once $thisAuthSource['login'];
}
if (isset($thisAuthSource['newUser']) && file_exists($thisAuthSource['newUser'])) {
include_once $thisAuthSource['newUser'];
} else {
error_log(
'Chamilo Authentication external file'.
' could not be found - this might prevent your system from using'.
' the authentication process in the user creation process',
0
);
if (isset($thisAuthSource['newUser'])) {
if (file_exists($thisAuthSource['newUser'])) {
include_once $thisAuthSource['newUser'];
} else {
error_log(
'Chamilo Authentication external file'.
' could not be found - this might prevent your system from using'.
' the authentication process in the user creation process',
0
);
}
}
}
} //end if is_array($extAuthSource)

Loading…
Cancel
Save