/**
  * Set sub tabs for ldap section
  *
  * @access private
  */
 private function setSubTabs()
 {
     $this->tabs_gui->addSubTabTarget("ldap_settings", $this->ctrl->getLinkTarget($this, 'serverList'), "serverList", get_class($this));
     // Disable all other tabs, if server hasn't been configured.
     include_once 'Services/LDAP/classes/class.ilLDAPServer.php';
     if (!count(ilLDAPServer::_getServerList())) {
         return true;
     }
     $this->tabs_gui->addSubTabTarget("ldap_user_mapping", $this->ctrl->getLinkTarget($this, 'userMapping'), "userMapping", get_class($this));
     $this->tabs_gui->addSubTabTarget('ldap_role_assignments', $this->ctrl->getLinkTarget($this, 'roleAssignments'), "roleAssignments", get_class($this));
     $this->tabs_gui->addSubTabTarget("ldap_role_mapping", $this->ctrl->getLinkTarget($this, 'roleMapping'), "roleMapping", get_class($this));
 }
예제 #2
0
 public static function _getFirstServer()
 {
     $servers = ilLDAPServer::_getServerList();
     if (count($servers)) {
         return $servers[0];
     }
     return 0;
 }