Commit 53d458a0 authored by sept_7's avatar sept_7

[FIX] Restore Default behaviour of LDAP Authentication from Tiki3: add

Anonymous Binding to LDAP server
parent 72f10981
......@@ -174,9 +174,12 @@ class TikiLdapLib {
$this->options['binddn'] = $this->user_dn($user);
break;
case 'ol': // openldap
default:
$this->options['binddn'] = 'cn='.$user.','.$prefs['auth_ldap_basedn'];
break;
default:
// Anonymous binding
unset($this->options['binddn']);
unset($this->options['bindpw']);
}
// attributes to fetch
......
......@@ -999,7 +999,7 @@ function get_default_prefs() {
'auth_ldap_debug' => 'n',
'auth_ldap_ssl' => 'n',
'auth_ldap_starttls' => 'n',
'auth_ldap_type' => 'full',
'auth_ldap_type' => 'default',
'auth_ldap_syncuserattr' => 'uid',
'auth_ldap_syncgroupattr' => 'cn',
......
......@@ -362,8 +362,9 @@
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="auth_ldap_type">{tr}LDAP Bind Type:{/tr}</label>
<select name="auth_ldap_type" id="auth_ldap_type">
<option value="full" {if $prefs.auth_ldap_type eq "full"} selected="selected"{/if}>{tr}Default: userattr=username,UserDN,BaseDN{/tr}</option>
<option value="ol" {if $prefs.auth_ldap_type eq "ol"} selected="selected"{/if}>{tr}userattr=username,BaseDN{/tr}</option>
<option value="default" {if $prefs.auth_ldap_type eq "default"} selected="selected"{/if}>{tr}Default: Anonymous Bind{/tr}</option>
<option value="full" {if $prefs.auth_ldap_type eq "full"} selected="selected"{/if}>{tr}Full: userattr=username,UserDN,BaseDN{/tr}</option>
<option value="ol" {if $prefs.auth_ldap_type eq "ol"} selected="selected"{/if}>{tr}OpenLDAP: userattr=username,BaseDN{/tr}</option>
<option value="ad" {if $prefs.auth_ldap_type eq "ad"} selected="selected"{/if}>{tr}Active Directory (username@domain){/tr}</option>
<option value="plain" {if $prefs.auth_ldap_type eq "plain"} selected="selected"{/if}>{tr}Plain Username{/tr}</option>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment