Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ProcessMaker/Http/Controllers/Admin/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,15 @@ function ($result, $item) {
);
$ssoUser = false;
if (class_exists(SsoUser::class)) {
// Check if the user is an SSO user (including SAML)
$ssoUser = SsoUser::where('user_id', $user->id)->exists();
}

// Check if the user is an LDAP user
if (isset($user->meta?->authenticationType) && $user->meta->authenticationType === 'ldap') {
$ssoUser = true;
}

// Get global and valid 2FA preferences for the user
$enabled2FA = config('password-policies.2fa_enabled', false);
$global2FAEnabled = config('password-policies.2fa_method', []);
Expand Down
6 changes: 6 additions & 0 deletions ProcessMaker/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ function ($result, $item) {

$ssoUser = false;
if (class_exists(SsoUser::class)) {
// Check if the user is an SSO user (including SAML)
$ssoUser = SsoUser::where('user_id', $currentUser->id)->exists();
}

// Check if the user is an LDAP user
if (isset($currentUser->meta?->authenticationType) && $currentUser->meta->authenticationType === 'ldap') {
$ssoUser = true;
}

// Get global and valid 2FA preferences for the user
$enabled2FA = config('password-policies.2fa_enabled', false);
$global2FAEnabled = config('password-policies.2fa_method', []);
Expand Down