/** * Obtener la pestaña de LDAP * @return bool */ public function getLdapTab() { $this->setAction(self::ACTION_CFG_LDAP); if (!$this->checkAccess(self::ACTION_CFG_GENERAL)) { return; } $this->view->addTemplate('ldap'); $this->view->assign('chkLdap', \SP\Config::getValue('ldap_enabled') ? 'checked="checked"' : ''); $this->view->assign('chkLdapADS', \SP\Config::getValue('ldap_ads') ? 'checked="checked"' : ''); $this->view->assign('ldapIsAvailable', \SP\Util::ldapIsAvailable()); $this->view->assign('ldapServer', \SP\Config::getValue('ldap_server')); $this->view->assign('ldapBindUser', \SP\Config::getValue('ldap_binduser')); $this->view->assign('ldapBindPass', \SP\Config::getValue('ldap_bindpass')); $this->view->assign('ldapBase', \SP\Config::getValue('ldap_base')); $this->view->assign('ldapGroup', \SP\Config::getValue('ldap_group')); $this->view->assign('groups', \SP\DB::getValuesForSelect('usrGroups', 'usergroup_id', 'usergroup_name')); $this->view->assign('profiles', \SP\DB::getValuesForSelect('usrProfiles', 'userprofile_id', 'userprofile_name')); $this->view->assign('ldapDefaultGroup', \SP\Config::getValue('ldap_defaultgroup')); $this->view->assign('ldapDefaultProfile', \SP\Config::getValue('ldap_defaultprofile')); $this->view->assign('actionId', $this->getAction(), 'ldap'); $this->view->append('tabs', array('title' => _('LDAP'))); $this->view->assign('tabIndex', $this->getTabIndex(), 'ldap'); }