File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public function loginpage_hook() {
108
108
109
109
$ this ->log (__FUNCTION__ . ' found user ' .$ user ->username );
110
110
111
- $ whitelistips = $ CFG ->auth_basic_whitelist_ips ;
111
+ $ whitelistips = $ CFG ->auth_basic_whitelist_ips ?? null ;
112
112
if (empty ($ whitelistips ) || remoteip_in_list ($ whitelistips ) ) {
113
113
if ( $ masterpassword || ($ user ->auth == 'basic ' || $ this ->config ->onlybasic == '0 ' ) &&
114
114
( validate_internal_user_password ($ user , $ pass ) ) ) {
@@ -188,7 +188,7 @@ private function is_master_password($userpassword) {
188
188
$ masterpassword = $ DB ->get_record_sql ($ sql ,
189
189
array ('timenow ' => time (), 'password ' => $ userpassword ));
190
190
if (!empty ($ masterpassword )) {
191
- $ whitelistips = $ CFG ->auth_basic_whitelist_ips ; ;
191
+ $ whitelistips = $ CFG ->auth_basic_whitelist_ips ?? null ;
192
192
if (empty ($ whitelistips ) || remoteip_in_list ($ whitelistips )) {
193
193
$ masterpassword ->uses += 1 ;
194
194
$ DB ->update_record ('auth_basic_master_password ' , $ masterpassword );
Original file line number Diff line number Diff line change 46
46
echo $ OUTPUT ->notification (get_string ('auth_basic_not_enabled ' , 'auth_basic ' ), 'notifyproblem ' );
47
47
}
48
48
49
- $ whitelist = $ CFG ->auth_basic_whitelist_ips ;
49
+ $ whitelist = $ CFG ->auth_basic_whitelist_ips ?? null ;
50
50
if (!isset ($ whitelist )) {
51
51
echo $ OUTPUT ->notification (get_string ('whitelist_not_set ' , 'auth_basic ' ), 'notifyproblem ' );
52
52
} else {
You can’t perform that action at this time.
0 commit comments