Skip to content

Commit b9b71ee

Browse files
authored
resolve m365 oAuth user creation Block (nilsteampassnet#4440)
Contributing fix discussed here: nilsteampassnet#4440 Allows for the creation of oAuth based users from m365 tenants
1 parent fae22cd commit b9b71ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sources/identify.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ public function getUserInfo($login, $enable_ad_user_auto_creation, $oauth2_enabl
21152115
$oauth2LoginOngoing = isset($session->get('userOauth2Info')['oauth2LoginOngoing']) ? $session->get('userOauth2Info')['oauth2LoginOngoing'] : false;
21162116
$data['oauth2_login_ongoing'] = $oauth2LoginOngoing;
21172117
$data['ldap_user_to_be_created'] = $enable_ad_user_auto_creation === true && DB::count() === 0 && $oauth2LoginOngoing !== true ? true : false;
2118-
$data['oauth2_user_to_be_created'] = $oauth2_enabled === true && DB::count() === 0 && $oauth2LoginOngoing === true ? true : false;
2118+
$data['oauth2_user_to_be_created'] = (bool)$oauth2_enabled === true && DB::count() === 0 && $oauth2LoginOngoing === true ? true : false;
21192119

21202120
return $data;
21212121
}
@@ -2687,4 +2687,4 @@ function identifyDoAzureChecks(
26872687
'mfaData' => ['message' => $lang->get('wrong_mfa_code')],
26882688
'mfaQRCodeInfos' => false,
26892689
];
2690-
}
2690+
}

0 commit comments

Comments
 (0)