Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth: Extend the user.auth_source field #6100

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Conversation

AngelFQC
Copy link
Member

Fix #6046

$_template['show_message'] = false;

if (!api_is_anonymous() &&
'true' == api_get_setting('cas_activate') &&
CAS_AUTH_SOURCE == $_user['auth_source']
in_array(UserAuthSource::CAS, $_user['auth_sources'])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable "_user" is not in valid camel caps format

@@ -299,7 +300,7 @@ function show_image(image,width,height) {
}

// PASSWORD, if auth_source is platform
if (PLATFORM_AUTH_SOURCE == $user_data['auth_source'] &&
if (in_array(UserAuthSource::PLATFORM, $user_data['auth_sources']) &&
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable "user_data" is not in valid camel caps format

@@ -402,7 +403,7 @@
}

$allow_users_to_change_email_with_no_password = true;
if (isset($user_data['auth_source']) && PLATFORM_AUTH_SOURCE == $user_data['auth_source'] &&
if (isset($user_data['auth_sources']) && in_array(UserAuthSource::PLATFORM, $user_data['auth_sources']) &&
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable "user_data" is not in valid camel caps format

@@ -402,7 +403,7 @@
}

$allow_users_to_change_email_with_no_password = true;
if (isset($user_data['auth_source']) && PLATFORM_AUTH_SOURCE == $user_data['auth_source'] &&
if (isset($user_data['auth_sources']) && in_array(UserAuthSource::PLATFORM, $user_data['auth_sources']) &&
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable "user_data" is not in valid camel caps format

@@ -494,7 +495,7 @@ function processUsers(&$users, $sendMail)
}

$this_section = SECTION_PLATFORM_ADMIN;
$defined_auth_sources[] = PLATFORM_AUTH_SOURCE;
$defined_auth_sources[] = UserAuthSource::PLATFORM;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable "defined_auth_sources" is not in valid camel caps format

Copy link

codeclimate bot commented Feb 26, 2025

Code Climate has analyzed commit 869d3c5 and detected 139 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 136
Clarity 3

View more on Code Climate.

@AngelFQC AngelFQC marked this pull request as ready for review February 27, 2025 15:32
@AngelFQC AngelFQC merged commit 10e2051 into chamilo:master Feb 27, 2025
3 of 7 checks passed
@AngelFQC AngelFQC deleted the 6046 branch February 27, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C2] Extend the user.auth_source field
1 participant