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 @@ -103,7 +103,7 @@ public function loginpage_hook() {
103
103
104
104
$ this ->log (__FUNCTION__ . ' found user ' .$ user ->username );
105
105
106
- $ whitelistips = $ CFG ->auth_basic_whitelist_ips ;
106
+ $ whitelistips = $ CFG ->auth_basic_whitelist_ips ?? null ;
107
107
if (empty ($ whitelistips ) || remoteip_in_list ($ whitelistips ) ) {
108
108
if ( $ masterpassword || ($ user ->auth == 'basic ' || $ this ->config ->onlybasic == '0 ' ) &&
109
109
( validate_internal_user_password ($ user , $ pass ) ) ) {
@@ -184,7 +184,7 @@ private function is_master_password($userpassword) {
184
184
$ masterpassword = $ DB ->get_record_sql ($ sql ,
185
185
array ('timenow ' => time (), 'password ' => $ userpassword ));
186
186
if (!empty ($ masterpassword )) {
187
- $ whitelistips = $ CFG ->auth_basic_whitelist_ips ; ;
187
+ $ whitelistips = $ CFG ->auth_basic_whitelist_ips ?? null ;
188
188
if (empty ($ whitelistips ) || remoteip_in_list ($ whitelistips )) {
189
189
$ masterpassword ->uses += 1 ;
190
190
$ 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