Skip to content

Commit 12655c3

Browse files
committed
Internal: Add additional check on alternative authentication source file to avoid logging useless warnings
1 parent 7ba8416 commit 12655c3

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

main/inc/local.inc.php

+11-9
Original file line numberDiff line numberDiff line change
@@ -852,15 +852,17 @@
852852
if (!empty($thisAuthSource['login']) && file_exists($thisAuthSource['login'])) {
853853
include_once $thisAuthSource['login'];
854854
}
855-
if (isset($thisAuthSource['newUser']) && file_exists($thisAuthSource['newUser'])) {
856-
include_once $thisAuthSource['newUser'];
857-
} else {
858-
error_log(
859-
'Chamilo Authentication external file'.
860-
' could not be found - this might prevent your system from using'.
861-
' the authentication process in the user creation process',
862-
0
863-
);
855+
if (isset($thisAuthSource['newUser'])) {
856+
if (file_exists($thisAuthSource['newUser'])) {
857+
include_once $thisAuthSource['newUser'];
858+
} else {
859+
error_log(
860+
'Chamilo Authentication external file'.
861+
' could not be found - this might prevent your system from using'.
862+
' the authentication process in the user creation process',
863+
0
864+
);
865+
}
864866
}
865867
}
866868
} //end if is_array($extAuthSource)

0 commit comments

Comments
 (0)