-
Notifications
You must be signed in to change notification settings - Fork 496
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
* Copyright (c) 2005 Bart Mollet <[email protected]>. | ||
*/ | ||
|
||
use Chamilo\CoreBundle\Entity\UserAuthSource; | ||
|
||
/** | ||
* Validates imported data. | ||
* | ||
|
@@ -167,7 +169,7 @@ function parse_csv_courses_data($file) | |
$this_section = SECTION_PLATFORM_ADMIN; | ||
api_protect_admin_script(); | ||
|
||
$defined_auth_sources[] = PLATFORM_AUTH_SOURCE; | ||
$defined_auth_sources[] = UserAuthSource::PLATFORM; | ||
|
||
if (isset($extAuthSource) && is_array($extAuthSource)) { | ||
$defined_auth_sources = array_merge($defined_auth_sources, array_keys($extAuthSource)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
/* For licensing terms, see /license.txt */ | ||
|
||
use Chamilo\CoreBundle\Entity\User; | ||
use Chamilo\CoreBundle\Entity\UserAuthSource; | ||
use ChamiloSession as Session; | ||
use Chamilo\CoreBundle\Component\Utils\ActionIcon; | ||
use Chamilo\CoreBundle\Component\Utils\ToolIcon; | ||
|
@@ -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']) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable "user_data" is not in valid camel caps format |
||
in_array('password', $profileList) | ||
) { | ||
$form->addElement('password', 'password0', [get_lang('Pass'), get_lang('Enter2passToChange')], ['size' => 40]); | ||
|
@@ -402,7 +403,7 @@ function show_image(image,width,height) { | |
} | ||
|
||
$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']) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable "user_data" is not in valid camel caps format There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable "user_data" is not in valid camel caps format |
||
'false' === api_get_setting('allow_users_to_change_email_with_no_password') | ||
) { | ||
$allow_users_to_change_email_with_no_password = false; | ||
|
There was a problem hiding this comment.
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