Пример #1
0
 /**
  * Comprobar si los parámetros necesario de LDAP están establecidos.
  *
  * @return bool
  */
 public static function checkLDAPParams()
 {
     self::$_isADS = Config::getValue('ldap_ads', false);
     self::$_searchBase = Config::getValue('ldap_base');
     self::$_ldapServer = !self::$_isADS ? Config::getValue('ldap_server') : LdapADS::getADServer(Config::getValue('ldap_server'));
     self::$_bindDN = Config::getValue('ldap_binduser');
     self::$_bindPass = Config::getValue('ldap_bindpass');
     self::$_ldapGroup = Config::getValue('ldap_group', '*');
     if (!self::$_searchBase || !self::$_ldapServer || !self::$_bindDN || !self::$_bindPass) {
         Log::writeNewLog(__FUNCTION__, _('Los parámetros de LDAP no están configurados'));
         return false;
     }
     return true;
 }