Projet

Général

Profil

Révision 59ae487e

Ajouté par Assos Assos il y a presque 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ldap/ldap_servers/LdapServer.class.php
172 172
          $server_record->{$db_field_name} = $value;
173 173
        }
174 174
      }
175
      //debug('ctools record'); debug($server_record);
176 175
    }
177 176
    else {
178 177
      $select = db_select('ldap_servers')
......
471 470
    if (!$result) {
472 471
      $error = "LDAP Server ldap_add(%dn) Error Server ID = %sid, LDAP Err No: %ldap_errno LDAP Err Message: %ldap_err2str ";
473 472
      $tokens = array('%dn' => $dn, '%sid' => $this->sid, '%ldap_errno' => ldap_errno($this->connection), '%ldap_err2str' => ldap_err2str(ldap_errno($this->connection)));
474
      //debug(t($error, $tokens));
475 473
      watchdog('ldap_server', $error, $tokens, WATCHDOG_ERROR);
476 474
    }
477 475

  
......
1324 1322
   */
1325 1323
  public function groupAddGroup($group_dn, $attributes = array()) {
1326 1324

  
1327
    //debug("this->dnExists(   $group_dn, boolean)"); debug($this->dnExists($group_dn, 'boolean'));
1328
   // debug("this->dnExists(   $group_dn, boolean)"); debug($this->dnExists($group_dn));
1329 1325
    if ($this->dnExists($group_dn, 'boolean')) {
1330 1326
      return FALSE;
1331 1327
    }
......
1451 1447
   * @return FALSE on error otherwise array of group members (could be users or groups)
1452 1448
   */
1453 1449
  public function groupAllMembers($group_dn) {
1454
   // debug("groupAllMembers $group_dn, this->groupMembershipsAttr=". $this->groupMembershipsAttr . 'this->groupGroupEntryMembershipsConfigured=' . $this->groupGroupEntryMembershipsConfigured);
1455 1450
    if (!$this->groupGroupEntryMembershipsConfigured) {
1456 1451
      return FALSE;
1457 1452
    }
......
1504 1499
    };
1505 1500

  
1506 1501
    foreach ($current_member_entries as $i => $member_entry) {
1507
      //dpm("groupMembersResursive:member_entry $i, level=$level < max_levels=$max_levels"); dpm($member_entry);
1508 1502
      // 1.  Add entry itself if of the correct type to $all_member_dns
1509 1503
      $objectClassMatch = (!$object_classes || (count(array_intersect(array_values($member_entry['objectclass']), $object_classes)) > 0));
1510 1504
      $objectIsGroup = in_array($this->groupObjectClass, array_values($member_entry['objectclass']));
......
1674 1668
        $query_for_parent_groups = '(&(objectClass=' . $this->groupObjectClass . ')' . $or . ')';
1675 1669

  
1676 1670
        foreach ($this->basedn as $base_dn) {  // need to search on all basedns one at a time
1677
          // debug("query for parent groups, base_dn=$base_dn, $query_for_parent_groups");
1678 1671
          $group_entries = $this->search($base_dn, $query_for_parent_groups);  // no attributes, just dns needed
1679 1672
          if ($group_entries !== FALSE  && $level < LDAP_SERVER_LDAP_QUERY_RECURSION_LIMIT) {
1680 1673
            $this->groupMembershipsFromEntryRecursive($group_entries, $all_group_dns, $tested_group_ids, $level + 1, LDAP_SERVER_LDAP_QUERY_RECURSION_LIMIT);

Formats disponibles : Unified diff