/**
  * Constructor Method
  *
  */
 function __construct($consumer_type, $params)
 {
     $this->consumerType = $consumer_type;
     $this->name = $params['consumer_name'];
     $this->namePlural = $params['consumer_name_plural'];
     $this->shortName = $params['consumer_short_name'];
     $this->shortNamePlural = $params['consumer_short_name_plural'];
     $this->consumerModule = $params['consumer_module'];
     $this->mappingDirections = $params['consumer_mapping_directions'];
     $this->testLink = l(t('test') . ' ' . $this->name, LDAP_SERVERS_MENU_BASE_PATH . '/authorization/test/' . $this->consumerType);
     $this->editLink = l(t('edit') . ' ' . $this->name, LDAP_SERVERS_MENU_BASE_PATH . '/authorization/edit/' . $this->consumerType);
     ldap_server_module_load_include('php', 'ldap_authorization', 'LdapAuthorizationConsumerConfAdmin.class');
     $this->consumerConf = new LdapAuthorizationConsumerConf($this);
 }
Пример #2
0
<?php

/**
 * @file
 * Active Directory LDAP Implementation Details
 *
 */
ldap_server_module_load_include('php', 'ldap_servers', 'ldap_types/LdapTypeAbstract.class');
class LdapTypeNovell extends LdapTypeAbstract
{
    public $documentation = 'http://www.novell.com/documentation/edir873/index.html?page=/documentation/edir873/edir873/data/h0000007.html';
    public $name = 'Novell eDirectory LDAP';
    public $typeId = 'Novell';
    public $description = 'Novell eDirectory LDAP';
    public $port = 389;
    public $tls = 1;
    public $encrypted = 0;
    public $user_attr = 'uid';
    public $mail_attr = 'mail';
    public $groupObjectClassDefault = 'groupOfNames';
    public $groupDerivationModelDefault = LDAP_SERVERS_DERIVE_GROUP_FROM_ENTRY;
    public $groupDeriveFromEntryAttrDefault = 'members';
    public $groupDeriveFromEntryUserIdDefault = 'dn';
}
Пример #3
0
 function query()
 {
     ldap_server_module_load_include('php', 'ldap_servers', 'LdapServer.class');
     $ldap_server = new LdapServer($this->sid);
     $ldap_server->connect();
     $ldap_server->bind();
     $results = array();
     $count = 0;
     // for debugging paginations, set: $ldap_server->searchPageStart = NULL, 0, 1, ... ; $ldap_server->searchPageEnd = NULL, 0, 1, ...;
     foreach ($this->baseDn as $base_dn) {
         $result = $ldap_server->search($base_dn, $this->filter, $this->attributes, 0, $this->sizelimit, $this->timelimit, $this->deref, $this->scope);
         if ($result !== FALSE && $result['count'] > 0) {
             $count = $count + $result['count'];
             $results = array_merge($results, $result);
         }
     }
     $results['count'] = $count;
     return $results;
 }
Пример #4
0
 public function deriveEmailFromEntry($ldap_entry)
 {
     if ($this->mail_attr) {
         // not using template
         return @$ldap_entry[$this->mail_attr][0];
     } elseif ($this->mail_template) {
         // template is of form [cn]@illinois.edu
         ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
         return ldap_server_token_replace($ldap_entry, $this->mail_template);
     } else {
         return FALSE;
     }
 }
Пример #5
0
 public function deriveEmailFromEntry($ldap_entry)
 {
     if ($this->mail_attr) {
         // not using template
         return @$ldap_entry[ldap_server_massage_text($this->mail_attr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)][0];
     } elseif ($this->mail_template) {
         // template is of form [cn]@illinois.edu
         ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
         return ldap_server_token_replace($ldap_entry, $this->mail_template);
     } else {
         return FALSE;
     }
 }