Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-auth_ldap_syncplus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-auth_ldap_syncplus
Commits
5178e16d
Commit
5178e16d
authored
8 years ago
by
Alexander Bias
Browse files
Options
Downloads
Patches
Plain Diff
Adopt code changes in Moodle 3.2 core auth_ldap
parent
c0287fc8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES.md
+4
-0
4 additions, 0 deletions
CHANGES.md
auth.php
+1
-1
1 addition, 1 deletion
auth.php
config.html
+24
-2
24 additions, 2 deletions
config.html
with
29 additions
and
3 deletions
CHANGES.md
+
4
−
0
View file @
5178e16d
...
@@ -4,6 +4,10 @@ moodle-auth_ldap_syncplus
...
@@ -4,6 +4,10 @@ moodle-auth_ldap_syncplus
Changes
Changes
-------
-------
### Unreleased
*
2017-03-03 - Adopt code changes in Moodle 3.2 core auth_ldap
### v3.2-r1
### v3.2-r1
*
2017-01-13 - Check compatibility for Moodle 3.2, no functionality change
*
2017-01-13 - Check compatibility for Moodle 3.2, no functionality change
...
...
This diff is collapsed.
Click to expand it.
auth.php
+
1
−
1
View file @
5178e16d
...
@@ -96,7 +96,7 @@ class auth_plugin_ldap_syncplus extends auth_plugin_ldap {
...
@@ -96,7 +96,7 @@ class auth_plugin_ldap_syncplus extends auth_plugin_ldap {
array_push
(
$contexts
,
$this
->
config
->
create_context
);
array_push
(
$contexts
,
$this
->
config
->
create_context
);
}
}
$ldap_pagedresults
=
ldap_paged_results_supported
(
$this
->
config
->
ldap_version
);
$ldap_pagedresults
=
ldap_paged_results_supported
(
$this
->
config
->
ldap_version
,
$ldapconnection
);
$ldap_cookie
=
''
;
$ldap_cookie
=
''
;
foreach
(
$contexts
as
$context
)
{
foreach
(
$contexts
as
$context
)
{
$context
=
trim
(
$context
);
$context
=
trim
(
$context
);
...
...
This diff is collapsed.
Click to expand it.
config.html
+
24
−
2
View file @
5178e16d
...
@@ -123,9 +123,31 @@ $fastpathoptions = array(AUTH_NTLM_FASTPATH_YESFORM => get_string('auth_ntlmsso_
...
@@ -123,9 +123,31 @@ $fastpathoptions = array(AUTH_NTLM_FASTPATH_YESFORM => get_string('auth_ntlmsso_
AUTH_NTLM_FASTPATH_ATTEMPT => get_string('auth_ntlmsso_ie_fastpath_attempt', 'auth_ldap'));
AUTH_NTLM_FASTPATH_ATTEMPT => get_string('auth_ntlmsso_ie_fastpath_attempt', 'auth_ldap'));
$disabled = '';
$disabled = '';
if (!ldap_paged_results_supported($config->ldap_version)) {
$pagedresultssupported = false;
if ($config->host_url !== '') {
/**
* We try to connect each and every time we open the config, because we want to set the Page
* Size setting as enabled or disabled depending on the configured LDAP server supporting
* pagination or not, and to notify the user about it. If the user changed the LDAP server (or
* the LDAP protocol version) last time, it might happen that paged results are no longer
* available and we want to show that to the user the next time she goes to the settings page.
*/
try {
$ldapconn = $this->ldap_connect();
$pagedresultssupported = ldap_paged_results_supported($config->ldap_version, $ldapconn);
} catch (Exception $e) {
// If we couldn't connect and get the supported options, we can only assume we don't support paged results.
$pagedresultssupported = false;
}
}
/* Make sure we only disable the paged result size setting and show the notification about it if
* there is a configured server that we tried to contact. Othersiwe, if someone's LDAP server does
* support paged results, they won't be able to turn it on the first time they set it up (because
* the field will be disabled).
*/
if (($config->host_url !== '') && (!$pagedresultssupported)) {
$disabled = ' disabled="disabled"';
$disabled = ' disabled="disabled"';
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap'));
echo $OUTPUT->notification(get_string('pagedresultsnotsupp', 'auth_ldap')
, \core\output\notification::NOTIFY_INFO
);
}
}
?>
?>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment