summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/ldap
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/ldap')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt7
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php37
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt23
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc35
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php21
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc3
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php72
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc2
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc9
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt93
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc101
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc186
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php164
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module17
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php1
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php16
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc61
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc15
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php14
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module5
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info6
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc7
38 files changed, 878 insertions, 141 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt
index d14cd36..b6b18c6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/CHANGELOG.txt
@@ -1,4 +1,9 @@
-Issue #1632922 by brianV. Schema fix for ldap query.
+Fixed fake ldap server in simpltests to never filter on dn=*. See http://drupal.org/node/1066608
+Issue #1647950 by BobA. Patch by BobA. Ldap Profile issue.
+Issue #1650718 by alanrussian. Patch by alanrussian.
+Issue #1661644 by thesaunterer. Patch by by thesaunterer. Bad error message code throws warning.
+Issue #1623584 by alanrussian. Patch by alanrussian.
+Issue #1634930 by boran. Added hook alter to allow intervention in ldap authentication->allowUser method.
Changes in ldap_authorization.inc to make logic clearer and set array keys in authorization lowercase.
Fix for ldap servers caching issue when ctools enabled. noticed the bug when building simpletests. There is no issue for this.
Issue #1371452. Simpletest coverage for ldap servers add, update, delete and class property population.
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php
index 75d0c3a..e0e8983 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/LdapAuthenticationConf.class.php
@@ -12,7 +12,7 @@ class LdapAuthenticationConf {
// no need for LdapAuthenticationConf id as only one instance will exist per drupal install
public $sids = array(); // server configuration ids being used for authentication
- public $servers = array(); // ldap server object
+ public $enabledAuthenticationServers = array(); // ldap server object
public $inDatabase = FALSE;
public $authenticationMode = LDAP_AUTHENTICATION_MODE_DEFAULT;
public $loginUIUsernameTxt;
@@ -68,9 +68,13 @@ class LdapAuthenticationConf {
);
/** are any ldap servers that are enabled associated with ldap authentication **/
+ public function hasEnabledAuthenticationServers() {
+ return !(count($this->enabledAuthenticationServers) == 0);
+ }
public function enabled_servers() {
- return !(count(array_filter(array_values($this->sids))) == 0);
+ return $this->hasEnabledAuthenticationServers();
}
+
function __construct() {
$this->load();
}
@@ -85,12 +89,13 @@ class LdapAuthenticationConf {
$this->{$property} = $saved[$property];
}
}
- foreach ($this->sids as $sid => $is_enabled) {
- if ($is_enabled) {
- $this->servers[$sid] = ldap_servers_get_servers($sid, 'enabled', TRUE);
+
+ $enabled_ldap_servers = ldap_servers_get_servers(NULL, 'enabled');
+ foreach ($this->sids as $sid => $enabled) {
+ if ($enabled && isset($enabled_ldap_servers[$sid])) {
+ $this->enabledAuthenticationServers[$sid] = $enabled_ldap_servers[$sid];
}
}
-
}
else {
$this->inDatabase = FALSE;
@@ -131,12 +136,19 @@ class LdapAuthenticationConf {
*
* return boolean
*/
- public function allowUser($name, $ldap_user_entry) {
+ public function allowUser($name, $ldap_user_entry, $account_exists = NULL) {
/**
* do one of the exclude attribute pairs match
*/
$exclude = FALSE;
+
+ // if user does not already exists and deferring to user settings AND user settings only allow
+ $user_register = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+ if (!$account_exists && $this->acctCreation == LDAP_AUTHENTICATION_ACCT_CREATION_USER_SETTINGS_FOR_LDAP && $user_register == USER_REGISTER_ADMINISTRATORS_ONLY) {
+ return FALSE;
+ }
+
foreach ($this->excludeIfTextInDn as $test) {
if (stripos($ldap_user_entry['dn'], $test) !== FALSE) {
return FALSE;// if a match, return FALSE;
@@ -163,7 +175,7 @@ class LdapAuthenticationConf {
else {
drupal_set_message(t(LDAP_AUTHENTICATION_DISABLED_FOR_BAD_CONF_MSG), 'warning');
$tokens = array('!ldap_authentication_config' => l(t('LDAP Authentication Configuration'), 'admin/config/people/ldap/authentication'));
- watchdog('warning', 'LDAP Authentication is configured to deny users based on php execution with php_eval function, but php module is not enabled. Please enable php module or remove php code at !ldap_authentication_config .', $tokens);
+ watchdog('ldap_authentication', 'LDAP Authentication is configured to deny users based on php execution with php_eval function, but php module is not enabled. Please enable php module or remove php code at !ldap_authentication_config .', $tokens);
return FALSE;
}
}
@@ -214,13 +226,20 @@ class LdapAuthenticationConf {
if (!$has_enabled_consumers) {
drupal_set_message(t(LDAP_AUTHENTICATION_DISABLED_FOR_BAD_CONF_MSG), 'warning');
$tokens = array('!ldap_consumer_config' => l(t('LDAP Authorization Configuration'), 'admin/config/people/ldap/authorization'));
- watchdog('warning', 'LDAP Authentication is configured to deny users without LDAP Authorization mappings, but 0 LDAP Authorization consumers are configured: !ldap_consumer_config .', $tokens);
+ watchdog('ldap_authentication', 'LDAP Authentication is configured to deny users without LDAP Authorization mappings, but 0 LDAP Authorization consumers are configured: !ldap_consumer_config .', $tokens);
return FALSE;
}
return FALSE;
}
+ // allow other modules to hook in and refuse if they like
+ $hook_result = TRUE;
+ drupal_alter('ldap_authentication_allowuser_results', $ldap_user_entry, $name, $hook_result);
+ if (!$hook_result) {
+ watchdog('ldap_authentication', "Authentication Allow User Result=refused for %name", array('%name' => $name), WATCHDOG_NOTICE);
+ return FALSE;
+ }
/**
* default to allowed
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
index 4533a85..11f74f6 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
@@ -5,6 +5,10 @@
PHP to Test for Allowed LDAP Users
=======================================
+Remember:
+-- php module must be enabled (its one of the core drupal modules)
+-- code should not be enclosed in <?php ?>
+
Two variables are available:
(1) $_name - the username ldap server configuration has mapped user to such as "jdoe" etc. How this is derived is configured in ldap_servers module.
@@ -26,7 +30,7 @@ array(
Result should print 1 for allowed or 0 for disallowed. The function used to evaluate the code is php_eval() in php.module
---------------------------------
-Examples:
+Example 1:
//exclude users with guests.myuniversity.edu email address
@@ -37,4 +41,21 @@ else {
print 0;
}
+---------------------------------
+Example 2:
+
+// test behaviour of nobody excluded
+print 1;
+
+---------------------------------
+Example 3:
+
+// test behaviour of nobody excluded
+print 0;
+
+
+
+
+
+
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc
index eb60148..307aadf 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.admin.inc
@@ -45,7 +45,7 @@ function ldap_authentication_admin_form_submit($form, &$form_state) {
$auth_conf = new LdapAuthenticationConfAdmin();
$auth_conf->drupalFormSubmit($form_state['values']); // add form data to object and save or create
- if (!$auth_conf->enabled_servers()) {
+ if (!$auth_conf->hasEnabledAuthenticationServers()) {
drupal_set_message(t('No LDAP servers are enabled for authentication,
so no LDAP Authentication can take place. This essentially disables
LDAP Authentication.'), 'warning');
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc
index e97a69a..1f040a2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.inc
@@ -27,7 +27,7 @@ function _ldap_authentication_login_form_alter(&$form, &$form_state, $form_id) {
if (!$auth_conf = ldap_authentication_get_valid_conf()) {
return;
}
- elseif (!$auth_conf->enabled_servers()) {
+ if (!$auth_conf->hasEnabledAuthenticationServers()) {
return;
}
@@ -173,7 +173,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
}
}
- if (!count($auth_conf->servers)) {
+ if (!count($auth_conf->enabledAuthenticationServers)) {
watchdog('ldap_authentication', 'No LDAP servers configured.', array(), WATCHDOG_ERROR);
form_set_error('name', 'Server Error: No LDAP servers configured.');
}
@@ -217,7 +217,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
}
}
- foreach ($auth_conf->servers as $sid => $ldap_server) {
+ foreach ($auth_conf->enabledAuthenticationServers as $sid => $ldap_server) {
$watchdog_tokens['%sid'] = $sid;
$watchdog_tokens['%bind_method'] = $ldap_server->bind_method;
if ($detailed_watchdog_log) {
@@ -247,7 +247,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
) {
$bind_success = ($ldap_server->bind() == LDAP_SUCCESS);
}
- elseif ($ldap_server->bind_method == LDAP_SERVERS_BIND_METHOD_ANON_USER) {
+ elseif ($ldap_server->bind_method == LDAP_SERVERS_BIND_METHOD_ANON) {
$bind_success = ($ldap_server->bind(NULL, NULL, TRUE) == LDAP_SUCCESS);
}
elseif ($sso_login) {
@@ -317,7 +317,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
/**
* #4 CHECK ALLOWED AND EXCLUDED LIST AND PHP FOR ALLOWED USERS
*/
- $allow = $auth_conf->allowUser($authname, $ldap_user);
+ $allow = $auth_conf->allowUser($authname, $ldap_user, $account_exists);
if (!$allow) {
$authentication_result = LDAP_AUTHENTICATION_RESULT_FAIL_DISALLOWED;
break; // regardless of how many servers, disallowed user fails
@@ -359,7 +359,7 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
$watchdog_tokens['%mail'] = $ldap_user['mail'];
}
if ($ldap_server->account_name_attr != '') {
- $accountname = $ldap_user['attr'][$ldap_server->account_name_attr][0];
+ $accountname = $ldap_user['attr'][ldap_server_massage_text($ldap_server->account_name_attr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)][0];
}
else {
$accountname = $authname;
@@ -445,10 +445,15 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
* a little tweak to add user->data and mail etc as parameters would make it more useful
* for external authentication modules
*/
- ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
-
-
- $account = ldap_create_drupal_account($authname, $accountname, $ldap_user['mail'], $ldap_user['dn'], $sid);
+ ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
+
+ $status = 1;
+ $user_register = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+ if ($auth_conf->acctCreation == LDAP_AUTHENTICATION_ACCT_CREATION_USER_SETTINGS_FOR_LDAP && $user_register == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) {
+ $status = 0; // if admin approval required, set status to 1.
+ }
+ $discard_edit = array();
+ $account = ldap_create_drupal_account($authname, $accountname, $ldap_user['mail'], $ldap_user['dn'], $sid, $status, $discard_edit);
if ($account === FALSE) {
// need to throw error that account was not created
}
@@ -458,8 +463,10 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
else { // account already exists
if ($ldap_authentication_authmap == FALSE) { // LDAP_authen.AC.disallow.ldap.drupal
if ($auth_conf->loginConflictResolve == LDAP_AUTHENTICATION_CONFLICT_LOG) {
- $watchdog_tokens['%conflict_name'] = $account_with_same_email->name;
- watchdog('ldap_authentication', 'LDAP user with DN %dn has a naming conflict with a local drupal user %conflict_name', $watchdog_tokens, WATCHDOG_ERROR);
+ if ($account_with_same_email = user_load_by_mail($ldap_user['mail'])) {
+ $watchdog_tokens['%conflict_name'] = $account_with_same_email->name;
+ watchdog('ldap_authentication', 'LDAP user with DN %dn has a naming conflict with a local drupal user %conflict_name', $watchdog_tokens, WATCHDOG_ERROR);
+ }
drupal_set_message(t('Another user already exists in the system with the same login name. You should contact the system administrator in order to solve this conflict.'), 'error');
return FALSE;
}
@@ -482,8 +489,8 @@ function _ldap_authentication_user_login_authenticate_validate(&$form_state) {
watchdog('ldap_authentication', 'User e-mail for %username update from %old to %new failed because of system problems.', $watchdog_tokens, WATCHDOG_ERROR);
}
elseif ($auth_conf->emailUpdate == LDAP_AUTHENTICATION_EMAIL_UPDATE_ON_LDAP_CHANGE_ENABLE_NOTIFY ) {
- $message_tokens = array('@mail' => $ldap_user['mail']);
- drupal_set_message(t('Your e-mail has been updated to match your LDAP account (@mail).', $message_tokens), 'status');
+ $watchdog_tokens['@mail'] = $ldap_user['mail'];
+ drupal_set_message(t('Your e-mail has been updated to match your LDAP account (@mail).', $watchdog_tokens), 'status');
}
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info
index 76234bb..9035021 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/ldap_authentication.info
@@ -14,9 +14,9 @@ files[] = ldap_authentication.theme.inc
files[] = ldap_authentication.admin.inc
files[] = tests/ldap_authentication.test
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc
index ae56824..fc262c0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/tests/LdapServerTestData.ldapauthen1.inc
@@ -74,6 +74,7 @@ $test_data['servers']['ldapauthen1']['search_results']['member=cn=jkool,ou=guest
*/
$test_data['servers']['ldapauthen1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -82,6 +83,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=jdoe,ou=campus accounts,dc=ad,
$test_data['servers']['ldapauthen1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -90,6 +92,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=jkool,ou=guest accounts,dc=ad,
$test_data['servers']['ldapauthen1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -98,6 +101,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniv
$test_data['servers']['ldapauthen1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -114,6 +118,7 @@ $test_data['servers']['ldapauthen1']['users']['cn=verykool,ou=special guests,ou=
*/
$test_data['servers']['ldapauthen1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php
index 5155981..fd59266 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/LdapAuthorizationConsumerConf.class.php
@@ -118,28 +118,27 @@ class LdapAuthorizationConsumerConf {
$this->sid = $consumer_conf->sid;
$this->consumerType = $consumer_conf->consumer_type;
- $this->numericConsumerConfId = $consumer_conf->numeric_consumer_conf_id;
+ $this->numericConsumerConfId = isset($consumer_conf->numeric_consumer_conf_id)? $consumer_conf->numeric_consumer_conf_id : NULL;
$this->status = ($consumer_conf->status) ? 1 : 0;
$this->onlyApplyToLdapAuthenticated = (bool)(@$consumer_conf->only_ldap_authenticated);
$this->deriveFromDn = (bool)(@$consumer_conf->derive_from_dn);
- $this->deriveFromDnAttr = $consumer_conf->derive_from_dn_attr;
+ $this->deriveFromDnAttr = isset($consumer_conf->derive_from_dn_attr) ? $consumer_conf->derive_from_dn_attr : NULL;
- $this->deriveFromAttr = (bool)($consumer_conf->derive_from_attr);
+ $this->deriveFromAttr = (bool)(@$consumer_conf->derive_from_attr);
$this->deriveFromAttrAttr = $this->linesToArray($consumer_conf->derive_from_attr_attr);
- $this->deriveFromAttrUseFirstAttr = (bool)($consumer_conf->derive_from_attr_use_first_attr);
- $this->deriveFromAttrNested = (bool)($consumer_conf->derive_from_attr_nested);
+ $this->deriveFromAttrUseFirstAttr = (bool)(@$consumer_conf->derive_from_attr_use_first_attr);
+ $this->deriveFromAttrNested = (bool)(@$consumer_conf->derive_from_attr_nested);
$this->deriveFromEntry = (bool)(@$consumer_conf->derive_from_entry);
$this->deriveFromEntryEntries = $this->linesToArray($consumer_conf->derive_from_entry_entries);
- $this->deriveFromEntryEntriesAttr = $consumer_conf->derive_from_entry_entries_attr;
-
+ $this->deriveFromEntryEntriesAttr = isset($consumer_conf->derive_from_entry_entries_attr) ? $consumer_conf->derive_from_entry_entries_attr : NULL;
$this->deriveFromEntryMembershipAttr = $consumer_conf->derive_from_entry_attr;
- $this->deriveFromEntryAttrMatchingUserAttr = $consumer_conf->derive_from_entry_user_ldap_attr;
- $this->deriveFromEntrySearchAll = (bool)($consumer_conf->derive_from_entry_search_all);
- $this->deriveFromEntryUseFirstAttr = (bool)($consumer_conf->derive_from_entry_use_first_attr);
- $this->deriveFromEntryNested = $consumer_conf->derive_from_entry_nested;
+ $this->deriveFromEntryAttrMatchingUserAttr = isset($consumer_conf->derive_from_entry_user_ldap_attr) ? $consumer_conf->derive_from_entry_user_ldap_attr : NULL;
+ $this->deriveFromEntrySearchAll = (bool)(@$consumer_conf->derive_from_entry_search_all);
+ $this->deriveFromEntryUseFirstAttr = (bool)(@$consumer_conf->derive_from_entry_use_first_attr);
+ $this->deriveFromEntryNested = isset($consumer_conf->derive_from_entry_nested) ? $consumer_conf->derive_from_entry_nested : NULL;
$this->mappings = $this->pipeListToArray($consumer_conf->mappings, FALSE);
$this->useMappingsAsFilter = (bool)(@$consumer_conf->use_filter);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc
index 69b6a26..452bb1d 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.inc
@@ -495,7 +495,7 @@ function _ldap_authorization_ldap_authorization_maps_alter(&$user, &$user_ldap_e
}
}
elseif (isset($user_ldap_entry[$consumer_conf->deriveFromEntryAttrMatchingUserAttr]) ||
- isset($user_ldap_entry['attr'][$consumer_conf->deriveFromEntryAttrMatchingUserAttr])) {
+ isset($user_ldap_entry['attr'][ldap_server_massage_text($consumer_conf->deriveFromEntryAttrMatchingUserAttr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)])) {
// $derive_from_entries_entries, $derive_from_entry_attr, $derive_from_entry_user_ldap_attr, $user_ldap_entry, $nested = FALSE
$derive_from_entry_authorizations = $ldap_server->deriveFromEntryGroups(
$consumer_conf->deriveFromEntryEntries,
@@ -505,6 +505,7 @@ function _ldap_authorization_ldap_authorization_maps_alter(&$user, &$user_ldap_e
$user_ldap_entry,
$consumer_conf->deriveFromEntryNested
);
+ // deriveFromEntryGroups($entries, $entries_attr
if (count($derive_from_entry_authorizations)) {
foreach ($derive_from_entry_authorizations as $i => $authorization) {
if ($consumer_conf->deriveFromEntryUseFirstAttr) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info
index 2f9addb..75bff56 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization.info
@@ -23,9 +23,9 @@ files[] = tests/Og/Og.test
files[] = tests/Og/Og2.test
configure = admin/config/people/ldap/authorization
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
index 102f749..f6fd40b 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/LdapAuthorizationConsumerRole.class.php
@@ -25,7 +25,7 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
public $revokeLdapProvisionedDefault = TRUE;
public $regrantLdapProvisionedDefault = TRUE;
public $createContainersDefault = TRUE;
- public $drupalRolesByName = array();
+ private $drupalRolesByName = array();
/**
* Constructor Method
@@ -112,15 +112,15 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
public function revokeSingleAuthorization(&$user, $role_name, &$user_auth_data) {
- $user_edit = array('roles' => array_diff($user->roles, array($this->drupalRolesByName[$role_name] => $role_name)));
+ $user_edit = array('roles' => array_diff($user->roles, array($this->getDrupalRoleByName($role_name) => $role_name)));
$account = user_load($user->uid);
$user = user_save($account, $user_edit);
- $result = ($user && !isset($user->roles[$this->drupalRolesByName[$role_name]]));
+ $result = ($user && !isset($user->roles[$this->getDrupalRoleByName($role_name)]));
if ($this->detailedWatchdogLog) {
watchdog('ldap_authorization', 'LdapAuthorizationConsumerDrupalRole.revokeSingleAuthorization()
revoked: rid=%rid, role_name=%role_name for username=%username, result=%result',
- array('%rid' => $this->drupalRolesByName[$role_name], '%role_name' => $role_name, '%username' => $user->name,
+ array('%rid' => $this->getDrupalRoleByName($role_name), '%role_name' => $role_name, '%username' => $user->name,
'%result' => $result), WATCHDOG_DEBUG);
}
@@ -133,19 +133,16 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
*/
public function grantSingleAuthorization(&$user, $role_name, &$user_auth_data) {
- if (! isset($this->drupalRolesByName[$role_name])) {
+ if (is_null($this->getDrupalRoleByName($role_name))) {
watchdog('ldap_authorization', 'LdapAuthorizationConsumerDrupalRole.grantSingleAuthorization()
failed to grant %username the role %role_name because role does not exist',
array('%role_name' => $role_name, '%username' => $user->name),
WATCHDOG_ERROR);
return FALSE;
}
- debug($user->roles);
- $new_roles = $user->roles + array($this->drupalRolesByName[$role_name] => $role_name);
+ $new_roles = $user->roles + array($this->getDrupalRoleByName($role_name) => $role_name);
$user_edit = array('roles' => $new_roles);
- debug($new_roles);
- debug($user_edit);
if ($this->detailedWatchdogLog) {
watchdog('ldap_authorization', 'grantSingleAuthorization in drupal rold' . print_r($user, TRUE), array(), WATCHDOG_DEBUG);
}
@@ -157,7 +154,7 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
if ($this->detailedWatchdogLog) {
watchdog('ldap_authorization', 'LdapAuthorizationConsumerDrupalRole.grantSingleAuthorization()
granted: rid=%rid, role_name=%role_name for username=%username, result=%result',
- array('%rid' => $this->drupalRolesByName[$role_name], '%role_name' => $role_name, '%username' => $user->name,
+ array('%rid' => $this->getDrupalRoleByName($role_name), '%role_name' => $role_name, '%username' => $user->name,
'%result' => $result), WATCHDOG_DEBUG);
}
@@ -171,40 +168,45 @@ class LdapAuthorizationConsumerDrupalRole extends LdapAuthorizationConsumerAbstr
public function validateAuthorizationMappingTarget($map_to, $form_values = NULL, $clear_cache = FALSE) {
$has_form_values = is_array($form_values);
- $message_type = NULL;
- $message_text = NULL;
- $normalized = $this->normalizeMappings(array($map_to));
- $tokens = array('!map_to' => $map_to);
- $pass = FALSE;
- if (is_array($normalized) && isset($normalized[0][1]) && $normalized[0][1] !== FALSE ) {
- $available_authorization_ids = $this->availableConsumerIDs($clear_cache);
+ $message_type = NULL;
+ $message_text = NULL;
+ $normalized = $this->normalizeMappings(array($map_to));
+ $tokens = array('!map_to' => $map_to);
+ $pass = FALSE;
+
+ if (is_array($normalized) && isset($normalized[0][1]) && $normalized[0][1] !== FALSE ) {
+ $available_authorization_ids = $this->availableConsumerIDs($clear_cache);
$available_authorization_ids = array_map('drupal_strtolower', $available_authorization_ids);
- // debug($available_authorization_ids); debug($normalized[0]);
- $pass = (in_array(drupal_strtolower($normalized[0]), $available_authorization_ids));
- }
+ $pass = (in_array(drupal_strtolower($normalized[0]), $available_authorization_ids));
+ }
- if (!$pass) {
- $message_text = '<code>"' . t('!map_to', $tokens) . '</code>" ' . t('does not map to any existing Drupal roles. ');
+ if (!$pass) {
+ $message_text = '<code>"' . t('!map_to', $tokens) . '</code>" ' . t('does not map to any existing Drupal roles. ');
if ($has_form_values) {
$create_consumers = (isset($form_values['synchronization_actions']['create_consumers']) && $form_values['synchronization_actions']['create_consumers']);
}
else {
$create_consumers = $this->consumerConf->create_consumers;
}
- if ($create_consumers && $this->allowConsumerObjectCreation) {
- $message_type = 'warning';
+ if ($create_consumers && $this->allowConsumerObjectCreation) {
+ $message_type = 'warning';
$message_text .= t('It will be created when needed. If "!map_to" is not intentional, please fix it', $tokens);
- }
- elseif (!$this->allowConsumerObjectCreation) {
- $message_type = 'error';
- $message_text .= t('Since automatic Drupal role creation is not possible with this module, an existing role must be mapped to.');
- }
- elseif (!$create_consumers) {
- $message_type = 'error';
- $message_text .= t('Since automatic Drupal role creation is disabled, an existing role must be mapped to. Either enable role creation or map to an existing role.');
- }
-
- }
+ }
+ elseif (!$this->allowConsumerObjectCreation) {
+ $message_type = 'error';
+ $message_text .= t('Since automatic Drupal role creation is not possible with this module, an existing role must be mapped to.');
+ }
+ elseif (!$create_consumers) {
+ $message_type = 'error';
+ $message_text .= t('Since automatic Drupal role creation is disabled, an existing role must be mapped to. Either enable role creation or map to an existing role.');
+ }
+ }
return array($message_type, $message_text);
}
+
+ private function getDrupalRoleByName($role_name) {
+ $role_name_lowercase = drupal_strtolower($role_name);
+
+ return (isset($this->drupalRolesByName[$role_name_lowercase]) ? $this->drupalRolesByName[$role_name_lowercase] : NULL);
+ }
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info
index 39c1848..29163f2 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_drupal_role/ldap_authorization_drupal_role.info
@@ -10,9 +10,9 @@ files[] = LdapAuthorizationConsumerRole.class.php
files[] = ldap_authorization_drupal_role.module
files[] = ldap_authorization_drupal_role.inc
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info
index b6434df..9b67c71 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.info
@@ -13,9 +13,9 @@ files[] = ldap_authorization_og.inc
core = "7.x"
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc
index 2a73919..b4d8064 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/1197636/1197636.ldap_servers.test_data.inc
@@ -45,6 +45,7 @@ $servers['fake_server1']['search_results']['member=cn=verykool,ou=special guests
*/
$servers['fake_server1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -59,6 +60,7 @@ $servers['fake_server1']['users']['cn=verykool,ou=special guests,ou=guest accoun
*/
$servers['fake_server1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc
index fcc766f..71637de 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/BasicTests/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -147,27 +155,32 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array('count' => 0),
);
@@ -188,6 +201,7 @@ $servers['ldapauthor1']['search_results']['(|((dn=cn=staff,ou=people,dc=ad,dc=my
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc
index 4ebe5a6..1cc5578 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromAttr/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -119,6 +125,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
@@ -132,6 +139,7 @@ $servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=ed
$servers['ldapauthor1']['users']['cn=justin,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=justin,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=justin,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'justin@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'justin', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -141,6 +149,7 @@ $servers['ldapauthor1']['users']['cn=justin,ou=guest accounts,dc=ad,dc=myunivers
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -149,6 +158,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -186,26 +196,31 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array('count' => 0),
);
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc
index 046345e..483b43a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/DeriveFromDN/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -138,6 +146,7 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc
index e4f20c1..19463f7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Og/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -147,27 +155,32 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array('count' => 0),
);
@@ -227,6 +240,7 @@ $servers['ldapauthor1']['search_results']['(|((dn=cn=staff,ou=people,dc=ad,dc=my
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,cn=groups,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc
index e4f20c1..ac40759 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authorization/tests/Other/ldap_servers.inc
@@ -50,6 +50,7 @@ $servers['ldapauthor1']['search_results']['(member=cn=jkool,ou=guest accounts,dc
*/
$servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jdoe@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jdoe', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -58,6 +59,7 @@ $servers['ldapauthor1']['users']['cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversi
$servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
'mailcode' => array( 0 => '17', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
@@ -68,6 +70,7 @@ $servers['ldapauthor1']['users']['cn=jkool,ou=guest accounts,dc=ad,dc=myuniversi
// duplicate of previous with escaped commas in cn.
$servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'wilmaf@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'wilmaf', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -81,6 +84,7 @@ $servers['ldapauthor1']['users']['cn=Flintstone\, Wilma,ou=guest accounts,dc=ad,
// duplicate of previous with quoted cn.
$servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'barneyr@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'barneyr', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -94,6 +98,7 @@ $servers['ldapauthor1']['users']['cn=Rubble\, Barney,ou=guest accounts,dc=ad,dc=
$servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'unkool@nowhere.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -102,6 +107,7 @@ $servers['ldapauthor1']['users']['cn=unkool,ou=lost,dc=ad,dc=myuniversity,dc=edu
$servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=verykool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'verykool@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'verykool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -117,6 +123,7 @@ $servers['ldapauthor1']['users']['cn=verykool,ou=special guests,ou=guest account
$servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=newkool,ou=special guests,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'newkool@guests.myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'newkool', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -125,6 +132,7 @@ $servers['ldapauthor1']['users']['cn=newkool,ou=special guests,ou=guest accounts
$servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'joeprogrammer@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'joeprogrammer', 'count' => 1),
'password' => array( 0 => 'goodpwd', 'count' => 1),
@@ -147,27 +155,32 @@ $servers['ldapauthor1']['users']['cn=joeprogrammer,ou=it,dc=ad,dc=myuniversity,d
*/
$servers['ldapauthor1']['groups']['cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=developers,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=it,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1), // bogus recursion to test bogus recursion
);
$servers['ldapauthor1']['groups']['cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=staff,ou=people,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
);
$servers['ldapauthor1']['groups']['cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=people,ou=it,dc=ad,dc=myuniversity,dc=edu'),
'memberOf' => array('count' => 0),
);
@@ -227,6 +240,7 @@ $servers['ldapauthor1']['search_results']['(|((dn=cn=staff,ou=people,dc=ad,dc=my
*/
$servers['ldapauthor1']['users']['cn=service-account,dc=ad,dc=myuniversity,dc=edu']['attr'] = array(
'dn' => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu',
+ 'distinguishedname' => array( 0 => 'cn=service-account,dc=ad,dc=myuniversity,dc=edu'),
'mail' => array( 0 => 'service-account@myuniversity.edu', 'count' => 1),
'sAMAccountName' => array( 0 => 'service-account', 'count' => 1),
'memberOf' => array(
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info
index 80852cc..bac9ad3 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_feeds/ldap_feeds.info
@@ -12,9 +12,9 @@ configure = admin/structure/feeds
core = 7.x
php = 5.2
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info
index 134f3b2..1cef3ad 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_help.info
@@ -6,9 +6,9 @@ core = 7.x
dependencies[] = ldap_servers
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt
new file mode 100644
index 0000000..70b8c5b
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/README.txt
@@ -0,0 +1,93 @@
+
+This script is intended to help separate LDAP Drupal module configuration and bugs from LDAP server, ldap php extension, and related connectivity and LDAP permissions issues. It uses the php ldap extension functions like ldap_connect(), ldap_search(), etc. rather than the Drupal LDAP module code.
+
+Watchout for the following:
+-- The test script does not depend on the Drupal LDAP module and should not be run within a web server context. -- Command line PHP with the LDAP Extension enabled are requirements.
+-- Often command line PHP will have a different php.ini configuration than the web server's php.ini. See http://php.net/manual/features.commandline.php
+
+Additional background on prerequisites and debugging Drupal LDAP module are available at:
+http://drupal.org/node/1023900
+http://drupal.org/node/1141764
+
+
+--------------------------------
+Running the Script
+--------------------------------
+
+1. Copy this directory (ldap_test_script) outside of web root.
+2. Edit config.inc to reflect your server configuration. The array is in the form:
+ $config['servers'][<server friendly name>][<server param>] = value
+ $config['servers'][<server friendly name>]['test_queries'][<query name>] = array of test query data
+ $config['servers'][<server friendly name>]['test_provisions'][<provision name>] = array of test provision data
+
+ in provisioning part of array:
+ 'delete_if_exists' TURE | FALSE indicates if the provisioned object should be deleted if it exists
+ 'find_filter' is the filter to find the object. eg. 'cn=jdoe', 'distinguishedname=...'
+ 'attr' is the array of attribute/values to provision. should not include 'dn'
+
+ such as:
+
+ array(
+ 'servers' => array(
+ 'default' => array(
+ 'server_address' => 'ad.mycollege.edu',
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT,
+ 'server_base_dn' => 'ou=people,dc=ad,dc=mycollege,dc=edu',
+ 'server_bind_dn' => 'cn=ldap-service-account,ou=service accounts,dc=ad,dc=mycollege,dc=edu',
+ 'server_bind_pw' => 'password_here',
+ 'test_queries' => array(
+ 'user' => array(
+ 'filter' => 'cn=jbarclay',
+ 'show_attr' => array('dn','cn','displayname','sn','givenname','mail','samaccountname','email'),
+ ),
+ ),
+ 'test_provisions' => array(
+ 'simple_user' => array(
+ 'dn' => "cn=ed-drupal-user-17,ou=people,dc=ad,dc=mycollege,dc=edu",
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-user-17,ou=people,dc=ad,dc=mycollege,dc=edu",
+ 'attr' => array(
+ "displayName" => "Drupal User",
+ "cn" => 'ed-drupal-user-17',
+ "samaccountname" => 'ed-drupal-user-17',
+ "objectclass" => array(
+ "top", "person", "organizationalPerson", "user",
+ ),
+ "description" => "test user",
+ 'mail' => 'ed-drupal-user-17@ad.mycollege.edu',
+ 'givenName' => 'Drupal',
+ 'sn' => 'User',
+ 'distinguishedName' => "cn=ed-drupal-user-17,ou=people,dc=ad,dc=mycollege,dc=edu",
+ ),
+ ),
+ 'simple_group' => array(
+ 'dn' => "cn=ed-drupal-group2,ou=groups,dc=ad,dc=mycollege,dc=edu",
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-group2,ou=groups,dc=ad,dc=mycollege,dc=edu",
+ 'attr' => array(
+ "cn" => 'ed-drupal-group2',
+ "sAMAccountName" => 'ed-drupal-group2',
+ 'instanceType' => '4',
+ "objectClass" => array(
+ "top", "group",
+ ),
+ 'name' => 'ed-drupal-group2',
+ 'objectCategory' => 'CN=Group,CN=Schema,CN=Configuration,dc=mycollege,dc=edu',
+ 'distinguishedName' => "cn=ed-drupal-group2,ou=groups,dc=ad,dc=mycollege,dc=edu",
+ ),
+ ),
+ ),
+ );
+
+3. Comment out the die() statement near the top of config.php
+ That is:
+ die('Move this..
+ Becomes:
+ // die('Move this...
+
+4. From the ldap_test_script, type:
+ php test.php
+
+
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc
new file mode 100644
index 0000000..27754d8
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/config.inc
@@ -0,0 +1,101 @@
+<?php
+
+die('Move this script outside of Drupal and uncomment the die statement in config.inc to run.'); // remove this line after moving out the scripts outside of drupal root.
+
+function ldap_help_config() {
+
+ // these variables are just for convenience, they can be hard coded directly into the $config array
+ $provision_root = 'ou=test,ou=drupal,dc=ad,dc=mycollege,dc=edu';
+ $query_root = 'dc=ad,dc=mycollege,dc=edu';
+ $user_root = 'ou=people,dc=mycollege,dc=edu';
+ $bind_user = 'cn=drupal-ldap,ou=service accounts,dc=ad,dc=mycollege,dc=edu';
+ $bind_pwd = 'password';
+ $server_address = 'ad.mycollege.edu';
+
+ $config = array(
+ 'servers' => array(
+ 'default test' => array(
+ 'server_address' => $server_address,
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT, // LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT OR LDAP_SERVERS_BIND_METHOD_ANON
+ 'server_base_dn' => $user_root,
+ 'server_bind_dn' => $bind_user,
+ 'server_bind_pw' => $bind_pwd,
+ 'test_queries' => array(
+ 'user' => array(
+ 'filter' => 'cn=jbarclay',
+ 'show_attr' => array('dn','cn','displayname','sn','givenname','mail','samaccountname','email'),
+ ),
+ ),
+ 'test_provisions' => array(),
+ ),
+ 'query test' => array(
+ 'server_address' => $server_address,
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT, // LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT OR LDAP_SERVERS_BIND_METHOD_ANON
+ 'server_base_dn' => $query_root,
+ 'server_bind_dn' => $bind_user,
+ 'server_bind_pw' => $bind_pwd,
+ 'test_queries' => array(
+ 'group' => array(
+ 'filter' => 'cn=ed-it-nag',
+ 'show_attr' => array('dn','cn','samaccountname'),
+ ),
+ ),
+ 'test_provisions' => array(),
+ ),
+ 'provision test' => array(
+ 'server_address' => $server_address,
+ 'server_port' => 389,
+ 'server_tls' => FALSE,
+ 'server_bind_method' => LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT, // LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT OR LDAP_SERVERS_BIND_METHOD_ANON
+ 'server_base_dn' => $provision_root,
+ 'server_bind_dn' => $bind_user,
+ 'server_bind_pw' => $bind_pwd,
+ 'test_queries' => array(),
+ 'test_provisions' => array(
+ 'simple_user' => array(
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-user-17,$provision_root",
+ 'dn' => "cn=ed-drupal-user-17,$provision_root",
+ 'attr' => array(
+ "displayName" => "Drupal User",
+ "cn" => 'ed-drupal-user-17',
+ "samaccountname" => 'ed-drupal-user-17',
+ "objectclass" => array(
+ "top", "person", "organizationalPerson", "user",
+ ),
+ "description" => "test user",
+ 'mail' => 'ed-drupal-user-17@blah.com',
+ 'givenName' => 'Drupal',
+ 'sn' => 'User',
+ 'distinguishedName' => "cn=ed-drupal-user-17,$provision_root",
+ ),
+ ),
+ 'simple_group' => array(
+ 'delete_if_exists' => TRUE,
+ 'find_filter' => "distinguishedName=cn=ed-drupal-group2,$provision_root",
+ 'dn' => "cn=ed-drupal-group2,$provision_root",
+ 'attr' => array(
+ "cn" => 'ed-drupal-group2',
+ "sAMAccountName" => 'ed-drupal-group2',
+ 'instanceType' => '4',
+ "objectClass" => array(
+ "top", "group",
+ ),
+ 'name' => 'ed-drupal-group2',
+ 'distinguishedName' => "cn=ed-drupal-group2,$provision_root",
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+
+ return $config;
+
+}
+
+?> \ No newline at end of file
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc
new file mode 100644
index 0000000..5ea11c1
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/functions.inc
@@ -0,0 +1,186 @@
+<?php
+
+error_reporting(E_ALL | E_STRICT);
+set_time_limit (0);
+ini_set("display_errors", 1);
+ini_set("max_execution_time", 0);
+
+define('LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT', 1);
+define('LDAP_SERVERS_BIND_METHOD_ANON', 3);
+
+define('LDAP_FAIL', -1);
+
+define('LDAP_SUCCESS', 0x00);
+define('LDAP_OPERATIONS_ERROR', 0x01);
+define('LDAP_PROTOCOL_ERROR', 0x02);
+define('LDAP_TIMELIMIT_EXCEEDED', 0x03);
+define('LDAP_SIZELIMIT_EXCEEDED', 0x04);
+define('LDAP_COMPARE_FALSE', 0x05);
+define('LDAP_COMPARE_TRUE', 0x06);
+define('LDAP_AUTH_METHOD_NOT_SUPPORTED', 0x07);
+define('LDAP_STRONG_AUTH_REQUIRED', 0x08);
+//NotusedinLDAPv3);
+define('LDAP_PARTIAL_RESULTS', 0x09);
+
+//Next5newinLDAPv3);
+define('LDAP_REFERRAL', 0x0a);
+define('LDAP_ADMINLIMIT_EXCEEDED', 0x0b);
+define('LDAP_UNAVAILABLE_CRITICAL_EXTENSION', 0x0c);
+define('LDAP_CONFIDENTIALITY_REQUIRED', 0x0d);
+define('LDAP_SASL_BIND_INPROGRESS', 0x0e);
+
+define('LDAP_NO_SUCH_ATTRIBUTE', 0x10);
+define('LDAP_UNDEFINED_TYPE', 0x11);
+define('LDAP_INAPPROPRIATE_MATCHING', 0x12);
+define('LDAP_CONSTRAINT_VIOLATION', 0x13);
+define('LDAP_TYPE_OR_VALUE_EXISTS', 0x14);
+define('LDAP_INVALID_SYNTAX', 0x15);
+
+define('LDAP_NO_SUCH_OBJECT', 0x20);
+define('LDAP_ALIAS_PROBLEM', 0x21);
+define('LDAP_INVALID_DN_SYNTAX', 0x22);
+
+define('LDAP_IS_LEAF', 0x23);
+define('LDAP_ALIAS_DEREF_PROBLEM', 0x24);
+
+define('LDAP_INAPPROPRIATE_AUTH', 0x30);
+define('LDAP_INVALID_CREDENTIALS', 0x31);
+define('LDAP_INSUFFICIENT_ACCESS', 0x32);
+define('LDAP_BUSY', 0x33);
+define('LDAP_UNAVAILABLE', 0x34);
+define('LDAP_UNWILLING_TO_PERFORM', 0x35);
+define('LDAP_LOOP_DETECT', 0x36);
+
+define('LDAP_SORT_CONTROL_MISSING', 0x3C);
+define('LDAP_INDEX_RANGE_ERROR', 0x3D);
+
+define('LDAP_NAMING_VIOLATION', 0x40);
+define('LDAP_OBJECT_CLASS_VIOLATION', 0x41);
+define('LDAP_NOT_ALLOWED_ON_NONLEAF', 0x42);
+define('LDAP_NOT_ALLOWED_ON_RDN', 0x43);
+define('LDAP_ALREADY_EXISTS', 0x44);
+define('LDAP_NO_OBJECT_CLASS_MODS', 0x45);
+define('LDAP_RESULTS_TOO_LARGE', 0x46);
+//NexttwoforLDAPv3);
+define('LDAP_AFFECTS_MULTIPLE_DSAS', 0x47);
+define('LDAP_OTHER', 0x50);
+
+//UsedbysomeAPIs);
+define('LDAP_SERVER_DOWN', 0x51);
+define('LDAP_LOCAL_ERROR', 0x52);
+define('LDAP_ENCODING_ERROR', 0x53);
+define('LDAP_DECODING_ERROR', 0x54);
+define('LDAP_TIMEOUT', 0x55);
+define('LDAP_AUTH_UNKNOWN', 0x56);
+define('LDAP_FILTER_ERROR', 0x57);
+define('LDAP_USER_CANCELLED', 0x58);
+define('LDAP_PARAM_ERROR', 0x59);
+define('LDAP_NO_MEMORY', 0x5a);
+
+//PreliminaryLDAPv3codes);
+define('LDAP_CONNECT_ERROR', 0x5b);
+define('LDAP_NOT_SUPPORTED', 0x5c);
+define('LDAP_CONTROL_NOT_FOUND', 0x5d);
+define('LDAP_NO_RESULTS_RETURNED', 0x5e);
+define('LDAP_MORE_RESULTS_TO_RETURN', 0x5f);
+define('LDAP_CLIENT_LOOP', 0x60);
+define('LDAP_REFERRAL_LIMIT_EXCEEDED', 0x61);
+
+
+//error_reporting(E_ALL & ~E_NOTICE);
+
+define('LDAP_SCRIPTS_COMMAND_LINE_WARNING', "Warning: PHP from the command line may have different PHP versions, php.ini files, and security context than running in a webserver context. This may produce false test results since Drupal LDAP Modules are run in the web server context.");
+
+require_once('config.inc');
+
+function ldap_help_connect($address, $port, $tls, $test = FALSE) {
+
+ if ($test) {
+ $false_con = ldap_connect("fakehostname.sdfserewerdfsdf.com", 389); // test for ldap extensions that don't actually connect until bind
+ if (ldap_errno($false_con) == LDAP_SUCCESS) {
+ $con = ldap_connect($address, $port);
+ return array(LDAP_OTHER, "ldap_connect does not actually connect until bind with installed extension, so connect is not a valid test.", $con);
+ }
+ }
+
+ $con = ldap_connect($address, $port);
+
+ if (!$con || ldap_errno($con) != LDAP_SUCCESS) {
+ $err = ldap_errno($con) . ":" . ldap_error($con) . ":" . ldap_err2str(ldap_errno($con)) . "!";
+ return array(LDAP_CONNECT_ERROR, "LDAP Connect failure to $address : $port. $err");
+ }
+
+ // Use TLS if we are configured and able to.
+ if ($tls) {
+ ldap_get_option($con, LDAP_OPT_PROTOCOL_VERSION, $vers);
+ if ($vers == -1) {
+ return array(LDAP_PROTOCOL_ERROR, "Could not get LDAP protocol version.");
+ }
+ if ($vers != 3) {
+ return array(LDAP_CONNECT_ERROR, 'Could not start TLS, only supported by LDAP v3.');
+ }
+ elseif (!function_exists('ldap_start_tls')) {
+ return array(LDAP_CONNECT_ERROR, 'Could not start TLS. It does not seem to be supported by this PHP setup.');
+ }
+ elseif (!ldap_start_tls($con)) {
+ return array(LDAP_CONNECT_ERROR, "Could not start TLS. (Error ". ldap_errno($con) . ":" . ldap_error($con) . ").");
+ }
+ }
+
+ return array(LDAP_SUCCESS, "Successful Connection!", $con);
+}
+
+function ldap_help_show_error($con) {
+ return "\nLDAP Error Number: " . ldap_errno($con) . "\nLDAP Error Description: " . ldap_error($con);
+}
+
+function ldap_help_display($title, $value = NULL) {
+ if (is_array($value)) {
+ echo "\n" . $title;
+ foreach ($title as $subtitle => $subvalue) {
+ ldap_help_display($subtitle, $subvalue);
+ }
+ }
+ if (!$title && $value) {
+ echo "\n" . $value;
+ }
+ elseif ((int)$title === $title) {
+ echo "\n" . $value;
+ }
+ else {
+ echo "\n" . "$title: $value";
+ }
+
+}
+/**
+ * Disconnect (unbind) from an active LDAP server.
+ */
+function ldap_help_disconnect(&$con) {
+ if (!$con) {
+ // never bound or not currently bound, so no need to disconnect
+ }
+ else {
+ ldap_help_disconnect($con);
+ $con = NULL;
+ }
+}
+
+/** parse php modules from phpinfo */
+function ldap_help_parsePHPModules() {
+ ob_start();
+ phpinfo(INFO_MODULES);
+ $s = ob_get_contents();
+ ob_end_clean();
+ $matches = array();
+ preg_match_all("/(\nLDAP Support.*Vendor Version[^\n]*?).*$/iDsU", $s, $matches);
+ return isset($matches[1][0]) ? "\nphpinfo() LDAP Info:" . $matches[1][0] : '';
+}
+
+function ldap_help_encodePassword($password) {
+ $password="\"".$password."\"";
+ $encoded="";
+ for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; }
+ return $encoded;
+}
+
+?> \ No newline at end of file
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php
new file mode 100644
index 0000000..e03d555
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_help/ldap_test_script/test.php
@@ -0,0 +1,164 @@
+<?php
+
+// see README.txt for instructions
+
+require_once('functions.inc');
+
+$config = ldap_help_config();
+
+ldap_help_display(NULL, "------------------------------------------\n");
+ldap_help_display(NULL, LDAP_SCRIPTS_COMMAND_LINE_WARNING . "\n");
+
+ldap_help_display(NULL, "------------------------------------------\nldap extension test\n------------------------------------------");
+ldap_help_display("PHP Version", phpversion());
+ldap_help_display('LDAP Extension Loaded', (extension_loaded('ldap')) ? 'yes' : 'no');
+ldap_help_display(NULL, ldap_help_parsePHPModules());
+
+if (!extension_loaded('ldap')) {
+ die('PHP LDAP extension not loaded. Can not run tests. Check your php.ini and make sure ldap extension is avaialable.');
+}
+
+foreach ($config['servers'] as $sid => $server) {
+
+ /**
+ * Test LDAP Connect
+ */
+ $results = ldap_help_connect($server['server_address'], $server['server_port'], $server['server_tls'], TRUE);
+ $test_name = "\"" . $sid . "\"";
+
+ ldap_help_display(NULL, "------------------------------------------\n$test_name connect\n------------------------------------------");
+ $tls = ($server['server_tls']) ? 'yes' : 'no';
+ ldap_help_display('tls', $tls);
+
+ $anon_bind = ($server['server_bind_method'] == LDAP_SERVERS_BIND_METHOD_ANON);
+ $anon_bind_text = ($anon_bind) ? 'yes' : 'no';
+ ldap_help_display('anonymous bind', $anon_bind_text);
+
+ ldap_help_display('connect result', $results[1]);
+ ldap_help_display('connect context', join("",array("server: ", $server['server_address'], ", port: ",$server['server_port'], ", tls= $tls")));
+ $con = FALSE;
+ if ($results[0] == LDAP_SUCCESS) {
+ $con = $results[2];
+ }
+ elseif ($results[0] == LDAP_OTHER) {
+ $con = $results[2];
+ }
+ else {
+ ldap_help_disconnect($con);
+ continue;
+ }
+
+ /**
+ * Test LDAP Bind
+ */
+
+ ldap_help_display(NULL, "------------------------------------------\n$test_name bind\n------------------------------------------");
+
+ if ($anon_bind) {
+ if (@!ldap_bind($con)) {
+ $results = array(ldap_errno($con), "LDAP anonymous bind error.". ldap_help_show_error($con));
+ }
+ }
+ else {
+ $bind_result = @ldap_bind($con, $server['server_bind_dn'], $server['server_bind_pw']);
+ if (!$bind_result) {
+ $results = array(ldap_errno($con), "LDAP bind failure for user " . $server['server_bind_dn']. "." . ldap_help_show_error($con));
+ }
+ else {
+ $results = array(LDAP_SUCCESS, "LDAP bind success.");
+ }
+ }
+
+ ldap_help_display('bind result', $results[1]);
+ ldap_help_display('bind dn', $server['server_bind_dn']);
+
+ if ($results[0] != LDAP_SUCCESS) {continue;}
+
+
+ /**
+ * Test LDAP Queries
+ */
+ foreach ($server['test_queries'] as $query_id => $query) {
+ ldap_help_display(NULL, "------------------------------------------\n$test_name query \"$query_id\" \n------------------------------------------");
+
+ $filter = $query['filter'];
+ ldap_help_display('search base_dn',$server['server_base_dn']);
+ ldap_help_display('search filter',$filter);
+ ldap_help_display('server_address',$server['server_address']);
+ ldap_help_display('server_port',$server['server_port']);
+ ldap_help_display('tls',$tls);
+
+ $query_result = @ldap_search($con, $server['server_base_dn'], $filter);
+ if (!$query_result) {
+ ldap_help_display(ldap_errno($con), "LDAP search failure for user $filter." . ldap_help_show_error($con));
+ }
+ else {// display results
+ $entries = ldap_get_entries($con, $query_result);
+ // print_r($entries);
+ ldap_help_display('search result');
+ if (is_array($entries)) {
+ $entry_count = $entries['count'];
+ if ($entry_count == 0) {
+ ldap_help_display('no entries found');
+ }
+ else {
+ for ($j=0; $j<$entry_count; $j++) {
+ $entry = $entries[$j];
+ $attr_count = $entry['count'];
+ ldap_help_display(NULL,"\nsearch results, entry[$j]:");
+ ldap_help_display(' dn[' .$j . ']',$entry['dn']);
+ for ($i=0; $i<$attr_count; $i++) {
+ $attr_name = $entry[$i];
+ if (in_array($attr_name, $query['show_attr'])) {
+ $values_count = $entry[$attr_name]['count'];
+ for ($k=0; $k<$values_count; $k++) {
+ ldap_help_display(' ' . $attr_name .'[' .$k . ']',$entry[$attr_name][$k]);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Test LDAP Provisioning
+ */
+ foreach ($server['test_provisions'] as $provision_id => $provision) {
+ ldap_help_display(NULL, "------------------------------------------\n$test_name provision \"$provision_id\"\n------------------------------------------");
+
+ $dn = $provision['dn'];
+
+ ldap_help_display(NULL, "\nprovision, entry[$dn]:");
+ if ($provision['delete_if_exists']) {
+ $query_result = @ldap_search($con, $server['server_base_dn'], $provision['find_filter']);
+ if ($query_result) {
+ $entries = ldap_get_entries($con, $query_result);
+ if ($entries['count'] == 1) {
+ $result = @ldap_delete($con, $dn);
+ if ($result) {
+ ldap_help_display('deleted existing entry', $dn);
+ }
+ else {
+ ldap_help_display('failed to delete existing entry in provision', $dn);
+ continue;
+ }
+ }
+ else {
+ // no entry exists
+ }
+ }
+ }
+
+
+ $result = @ldap_add($con, $dn, $provision['attr']);
+ $show_result = $result ? 'success' : 'fail';
+ ldap_help_display('provision result', $show_result);
+ if (!$result) {
+ ldap_help_display('provision error', ldap_help_show_error($con));
+ }
+ }
+
+}
+
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info
index 6594151..3aae608 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.info
@@ -11,9 +11,9 @@ files[] = ldap_profile.admin.inc
files[] = LdapProfileConf.class.php
files[] = LdapProfileConfAdmin.class.php
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module
index 787463f..3b62fb7 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_profile/ldap_profile.module
@@ -83,16 +83,19 @@ function ldap_profile_user_login(&$edit, $account) {
module_load_include('functions.inc', 'ldap_servers');
+ if (!empty($account)) {
+ $ldapuser = ldap_servers_get_user_ldap_data($account);
+ if (!empty($ldapuser) && !empty($ldapuser['dn'])) {
+ $dn = $ldapuser['dn'];
+ }
+ }
+
if (is_array($account->data) && array_key_exists("ldap_authentication", $account->data)) {
$authdata = $account->data["ldap_authentication"];
if (array_key_exists('init', $authdata)) {
$authinit = $authdata['init'];
if (isset($servers[$authinit['sid']])) {
$server = $servers[$authinit['sid']];
- $ldapuser = TRUE;
- if (array_key_exists('dn', $authinit)) {
- $dn = $authinit['dn'];
- }
}
}
}
@@ -181,6 +184,12 @@ function ldap_profile_user_login(&$edit, $account) {
}
}
if (count($changes) > 0) {
+ // preload the previously created account as the original
+ // this is to prevent a cycling condition with entitycache.module
+ // which will continue until memory is exhausted
+ // the new field changes are treated as updates in this case
+ // (Do not reset the cache until after the changes are saved)
+ $account->original = user_load($account->uid, FALSE);
user_save($account, $changes);
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info
index fc4335c..c27d16e 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_query/ldap_query.info
@@ -17,9 +17,9 @@ files[] = tests/ldap_query.test
configure = admin/config/people/ldap/query
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
index c4ecd10..f3ef1ff 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
@@ -367,6 +367,7 @@ class LdapServer {
$result = $this->ldapQuery($scope, $ldap_query_params);
if ($result && (ldap_count_entries($this->connection, $result) !== FALSE) ) {
$entries = ldap_get_entries($this->connection, $result);
+ drupal_alter('ldap_server_search_results', $entries, $ldap_query_params);
return (is_array($entries)) ? $entries : FALSE;
}
elseif ($this->ldapErrorNumber()) {
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php
new file mode 100644
index 0000000..0da6cd4
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.api.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Documentations of the module hooks
+ */
+
+
+/**
+ * Allow the results from the ldap search answer to be modified
+ * The query parameters are provided as context infomation
+ * (readonly)
+ *
+ */
+function hook_ldap_server_search_results_alter(&$entries, $ldap_query_params) {
+ // look for a specific part of the $results array
+ // and maybe change it
+}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc
index 7fc57c9..8066847 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc
@@ -20,13 +20,15 @@ function ldap_server_module_load_include($type, $module, $name = NULL) {
* as LDAP_CREATE_ACCOUNT_ALREADY_EXISTS, LDAP_CREATE_ERROR
*
*/
-function ldap_create_drupal_account($authname, $accountname, $mail, $dn, $sid, $edit = array()) {
+// $account = ldap_create_drupal_account($authname, $accountname, $ldap_user['mail'], $ldap_user['dn'], $sid, array(), $status);
+
+function ldap_create_drupal_account($authname, $accountname, $mail, $dn, $sid, $status, $edit) {
$edit['name'] = $accountname;
$edit['pass'] = user_password(20);
$edit['mail'] = $mail;
$edit['init'] = $mail;
- $edit['status'] = 1;
+ $edit['status'] = $status;
if (!isset($edit['signature'])) {
$edit['signature'] = '';
}
@@ -207,16 +209,10 @@ function ldap_server_tokenize_entry($ldap_entry, $token_keys = 'all', $pre = LDA
foreach ($dn_parts as $pair) {
list($attr_name, $attr_value) = explode('=', $pair);
$attr_value = ldap_pear_unescape_dn_value($attr_value);
- try {
- $attr_value = check_plain($attr_value);
- }
- catch (Exception $e) {
- if ($detailed_watchdog_log) {
- $watchdog_tokens = array('%attr_name' => $attr_name);
- watchdog('ldap_servers', 'skipped tokenization of attribute %attr_name because the value would not pass check_plain function.', $watchdog_tokens, WATCHDOG_DEBUG);
- }
- continue; // don't tokenize data that can't pass check_plain
+ if (!($attr_value = ldap_server_check_plain($attr_value, $attr_name))) {
+ continue;
}
+
if (!isset($parts_count[$attr_name])) {
$tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $attr_value;
$parts_count[$attr_name] = 0;
@@ -237,18 +233,26 @@ function ldap_server_tokenize_entry($ldap_entry, $token_keys = 'all', $pre = LDA
foreach ($token_keys as $attr_name) {
$attr_value = $ldap_entry[$attr_name];
if (is_array($attr_value) && is_scalar($attr_value[0]) && $attr_value['count'] == 1) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = check_plain($attr_value[0]);
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . '0' . $post] = check_plain($attr_value[0]);
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = check_plain($attr_value[0]);
+ if ($value = ldap_server_check_plain($attr_value[0], $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $value;
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . '0' . $post] = $value;
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = $value;
+ }
}
elseif (is_array($attr_value) && $attr_value['count'] > 1) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = check_plain($attr_value[$attr_value['count']-1]);
+ if ($value = ldap_server_check_plain($attr_value[$attr_value['count']-1], $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . 'last' . $post] = $value;
+ }
for ($i=0; $i<$attr_value['count']; $i++) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . $i . $post] = check_plain($attr_value[$i]);
+ if ($value = ldap_server_check_plain($attr_value[$i], $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . LDAP_SERVERS_TOKEN_DEL . $i . $post] = $value;
+ }
}
}
elseif (is_scalar($attr_value)) {
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = check_plain($attr_value);
+ if ($value = ldap_server_check_plain($attr_value, $attr_name)) {
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $value;
+ }
}
}
}
@@ -272,16 +276,35 @@ function ldap_server_tokenize_entry($ldap_entry, $token_keys = 'all', $pre = LDA
else {
$value = $ldap_entry[$token_key][0];
}
- $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = check_plain($value);
+ $value = ldap_server_check_plain($value, $token_key);
+ if ($value === FALSE) {
+ continue; // don't tokenize data that can't pass check_plain
+ }
+ $tokens[$pre . ldap_server_massage_text($attr_name, 'attr_name', LDAP_SERVER_MASSAGE_TOKEN_REPLACE) . $post] = $value;
}
}
// include the dn. it will not be handled correctly by previous loops
- $tokens[$pre . 'dn' . $post] = check_plain($ldap_entry['dn']);
+ $tokens[$pre . 'dn' . $post] = ldap_server_check_plain($ldap_entry['dn']);
return $tokens;
}
+
+function ldap_server_check_plain($text, $attr_name = 'attribute', $detailed_watchdog_log = FALSE) {
+
+ try {
+ $text = @check_plain($text);
+ }
+ catch (Exception $e) {
+ if ($detailed_watchdog_log) {
+ $watchdog_tokens = array('%attr_name' => $attr_name);
+ watchdog('ldap_servers', 'skipped tokenization of attribute %attr_name because the value would not pass check_plain function.', $watchdog_tokens, WATCHDOG_DEBUG);
+ }
+ $text = FALSE;
+ }
+ return $text;
+}
/**
* @param string $template in form [cn]@myuniversity.edu
* @return array of all tokens in the template such as array('cn')
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info
index 1746a05..56818f5 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.info
@@ -23,9 +23,9 @@ files[] = tests/ldap_servers.test
configure = admin/config/people/ldap/servers
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc
index f731349..439601a 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/ldap_servers.test_form.inc
@@ -78,12 +78,14 @@ function ldap_servers_test_form($form, &$form_state, $op = NULL, $sid = NULL) {
'#weight' => 100,
);
+
if (isset($_SESSION['ldap_server_test_data']) && count($_SESSION['ldap_server_test_data']) > 0) {
$form['#suffix'] = theme('ldap_server_ldap_entry_table',
array(
'entry' => $_SESSION['ldap_server_test_data']['LDAP Entry']['attr'],
'username' => $_SESSION['ldap_server_test_data']['username'],
));
+
if (function_exists('dpm')) {
$user_name = $_SESSION['ldap_server_test_data']['username'];
dpm("ldap full result array for: " . $user_name);
@@ -92,14 +94,17 @@ function ldap_servers_test_form($form, &$form_state, $op = NULL, $sid = NULL) {
$user = user_load_by_name($user_name);
dpm("drupal user object for: $user_name");
dpm($user);
- $user_entity = entity_load_single('user', $user->uid);
- dpm("drupal user entity for: $user_name");
- dpm($user_entity);
+ $user_entity = entity_load('user', array($user->uid));
+ if (count($user_entity) > 0) {
+ dpm("drupal user entity for: $user_name");
+ dpm($user_entity);
+ }
}
unset($_SESSION['ldap_server_test_data']);
}
+
return $form;
}
@@ -120,6 +125,7 @@ function ldap_servers_test_form_validate($form, &$form_state) {
* Submit hook for the LDAP server form.
*/
function ldap_servers_test_form_submit($form, &$form_state) {
+
$errors = FALSE;
$values = $form_state['values'];
$sid = $values['sid'];
@@ -186,9 +192,10 @@ function ldap_servers_test_form_submit($form, &$form_state) {
'LDAP Entry' => $ldap_user,
);
}
- $message = theme_item_list(array('items' => $results, 'title' => t('Result Messages'), 'type' => 'ul', 'attributes' => array()));
+ $message = ''; // theme_item_list(array('items' => $results, 'title' => t('Result Messages'), 'type' => 'ul', 'attributes' => array()));
drupal_set_message(t($message), ($has_errors) ? 'error' : 'status');
+
$form_state['redirect'] = LDAP_SERVERS_MENU_BASE_PATH . "/servers/test/$sid";
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php
index b7cb8b9..d3943df 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_servers/tests/LdapServerTest.class.php
@@ -134,7 +134,7 @@ class LdapServerTest extends LdapServer {
* An array of matching entries->attributes, or FALSE if the search is empty.
*/
function search($base_dn = NULL, $filter, $attributes = array(), $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER, $scope = LDAP_SCOPE_SUBTREE) {
-
+ //debug("feaux_server_filter=$filter");
$filter = trim(str_replace(array("\n", " "),array('',''), $filter)); // for test matching simplicity remove line breaks and tab spacing
// debug("filter=$filter");
// debug('search'); debug("base_dn: $base_dn"); debug("filter:<pre>$filter</pre>");
@@ -159,6 +159,9 @@ class LdapServerTest extends LdapServer {
$filter = strtolower(trim($filter,"()"));
list($filter_attribute, $filter_value) = explode('=', $filter);
+ if (strtolower($filter_attribute) == 'dn') { // don't allow filtering on dn. filters should use distinguishedName
+ continue;
+ }
// $filter_value = ldap_pear_unescape_filter_value($filter_value);
// need to perform feaux ldap search here with data in
$results = array();
@@ -171,11 +174,12 @@ class LdapServerTest extends LdapServer {
$user_data_lcase['attr'][drupal_strtolower($attr)] = $values;
}
- $dn = strtolower($dn);
+
// if not in basedn, skip
// eg. basedn ou=campus accounts,dc=ad,dc=myuniversity,dc=edu
// should be leftmost string in:
// cn=jdoe,ou=campus accounts,dc=ad,dc=myuniversity,dc=edu
+ $dn = strtolower($dn);
$pos = stripos($dn, $base_dn);
if ($pos === FALSE || strcasecmp($base_dn, substr($dn, 0, $pos + 1)) == FALSE) {
if ($my_debug2) {debug("dn=$dn not in base_dn=$base_dn");}
@@ -206,7 +210,7 @@ class LdapServerTest extends LdapServer {
// loop through all attributes, if any don't match continue
- $user_data_lcase['attr']['dn'] = $dn;
+ $user_data_lcase['attr']['distinguishedname'] = $dn;
if ($attributes) {
$selected_user_data = array();
foreach ($attributes as $i => $attr_name) {
@@ -246,8 +250,8 @@ class LdapServerTest extends LdapServer {
}
// loop through all attributes, if any don't match continue
- $group_data['attr']['dn'] = $dn;
- $group_data['distinguishedname'] = $dn;
+ // $group_data['attr']['distinguishedname'] = $dn;
+ // $group_data['distinguishedname'] = $dn;
if ($attributes) {
$selected_group_data = array();
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info
index 1c78090..30c6a09 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.info
@@ -6,9 +6,9 @@ dependencies[] = ldap_authentication
core = 7.x
configure = admin/config/people/ldap/authentication
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module
index 784daa9..73ca5ff 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_sso/ldap_sso.module
@@ -32,8 +32,9 @@ function ldap_sso_menu() {
function ldap_sso_user_logout($account) {
$auth_conf = ldap_authentication_get_valid_conf();
if ($auth_conf->seamlessLogin == 1) {
- setcookie("seamless_login", 'do not auto login', time() + (int)$auth_conf->cookieExpire, base_path(), "");
- $_SESSION['seamless_login'] = $_COOKIE['seamless_login'];
+ $cookie_string = 'do not auto login';
+ setcookie("seamless_login", $cookie_string, time() + (int)$auth_conf->cookieExpire, base_path(), "");
+ $_SESSION['seamless_login'] = $cookie_string;
}
}
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info
index d2de16c..02da628 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/ldap_views.info
@@ -21,9 +21,9 @@ files[] = handlers/ldap_views_handler_filter.inc
files[] = handlers/ldap_views_handler_filter_attribute.inc
files[] = handlers/ldap_views_handler_sort.inc
files[] = handlers/ldap_views_handler_sort_attribute.inc
-; Information added by drupal.org packaging script on 2012-06-14
-version = "7.x-1.0-beta11"
+; Information added by drupal.org packaging script on 2012-08-20
+version = "7.x-1.0-beta12"
core = "7.x"
project = "ldap"
-datestamp = "1339643179"
+datestamp = "1345503423"
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc
index 79ba017..8ea19b0 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc
@@ -257,6 +257,9 @@ class ldap_views_plugin_query_ldap extends views_plugin_query {
$entry['jpegphoto'][0] = "<img src='data:image/jpeg;base64,".base64_encode($entry['jpegphoto'][0])."' alt='photo' />";
}
foreach ($view->field as $field) {
+ if (! isset($field_alias[$field->field_alias])) {
+ continue;
+ }
$alias = $field_alias[$field->field_alias];
if (is_array($entry) && array_key_exists($alias, $entry)) {
if (is_array($entry[$alias])) {
@@ -298,7 +301,6 @@ class ldap_views_plugin_query_ldap extends views_plugin_query {
}
}
$params[] = &$entries;
- call_user_func_array('array_multisort', $params);
// Some LDAP setups output a 'count' variable first in the array, which changes the array size;
// temporarily remove it, sort the arrays, and then put it back.
if (array_key_exists('count', $entries)) {
@@ -317,6 +319,9 @@ class ldap_views_plugin_query_ldap extends views_plugin_query {
$row = array();
$entry = &$entries[$offset + $i];
foreach ($view->field as $field) {
+ if (! isset($field_alias[$field->field_alias])) {
+ continue;
+ }
if (array_key_exists($field_alias[$field->field_alias], $entry)) {
$row[$field->field_alias] = $entry[$field_alias[$field->field_alias]];
}