当前位置: 首页>>代码示例>>PHP>>正文


PHP AuthLdap::useAuthLdap方法代码示例

本文整理汇总了PHP中AuthLdap::useAuthLdap方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthLdap::useAuthLdap方法的具体用法?PHP AuthLdap::useAuthLdap怎么用?PHP AuthLdap::useAuthLdap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AuthLdap的用法示例。


在下文中一共展示了AuthLdap::useAuthLdap方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pdfLdapForm

 static function pdfLdapForm(PluginPdfSimplePDF $pdf, Group $item)
 {
     if (Session::haveRight("config", "r") && AuthLdap::useAuthLdap()) {
         $pdf->setColumnsSize(100);
         $pdf->displayTitle(__('LDAP directory link'));
         $pdf->displayText('<b>' . sprintf(__('%1$s: %2$s'), __('User attribute containing its groups') . '</b>', $item->getField('ldap_field')));
         $pdf->displayText('<b>' . sprintf(__('%1$s: %2$s'), __('Attribute value') . '</b>', $item->getField('ldap_value')));
         $pdf->displayText('<b>' . sprintf(__('%1$s: %2$s'), __('Group DN') . '</b>', $item->getField('ldap_group_dn')));
         $pdf->displaySpace();
     }
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:11,代码来源:group.class.php

示例2: title

 /**
  * Print a good title for user pages
  *
  * @return nothing (display)
  **/
 function title()
 {
     global $CFG_GLPI;
     $buttons = array();
     $title = self::getTypeName(2);
     if (static::canCreate()) {
         $buttons["user.form.php"] = __('Add user...');
         $title = "";
         if (Auth::useAuthExt()) {
             // This requires write access because don't use entity config.
             $buttons["user.form.php?new=1&amp;ext_auth=1"] = __('... From an external source');
         }
     }
     if (Session::haveRight("import_externalauth_users", "w")) {
         if (AuthLdap::useAuthLdap()) {
             $buttons["ldap.php"] = __('LDAP directory link');
         }
     }
     Html::displayTitle($CFG_GLPI["root_doc"] . "/pics/users.png", self::getTypeName(2), $title, $buttons);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:25,代码来源:user.class.php

示例3: useAuthExt

 /**
  * Is an external authentication used ?
  *
  * @return boolean
  **/
 static function useAuthExt()
 {
     //Get all the ldap directories
     if (AuthLdap::useAuthLdap()) {
         return true;
     }
     if (AuthMail::useAuthMail()) {
         return true;
     }
     if (!empty($CFG_GLPI["x509_email_field"])) {
         return true;
     }
     // Existing auth method
     if (!empty($CFG_GLPI["ssovariables_id"])) {
         return true;
     }
     // Using CAS server
     if (!empty($CFG_GLPI["cas_host"])) {
         return true;
     }
     return false;
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:27,代码来源:auth.class.php

示例4: showLDAPForm

 /**
  * @param $ID
  **/
 function showLDAPForm($ID)
 {
     $options = array();
     $this->initForm($ID, $options);
     echo "<form name='groupldap_form' id='groupldap_form' method='post' action='" . $this->getFormURL() . "'>";
     echo "<div class='spaced'><table class='tab_cadre_fixe'>";
     if (Group::canUpdate() && Session::haveRight("user", User::UPDATEAUTHENT) && AuthLdap::useAuthLdap()) {
         echo "<tr class='tab_bg_1'>";
         echo "<th colspan='2' class='center'>" . __('In users') . "</th></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Attribute of the user containing its groups') . "</td>";
         echo "<td>";
         Html::autocompletionTextField($this, "ldap_field");
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Attribute value') . "</td>";
         echo "<td>";
         Html::autocompletionTextField($this, "ldap_value");
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<th colspan='2' class='center'>" . __('In groups') . "</th>";
         echo "</tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . __('Group DN') . "</td>";
         echo "<td>";
         Html::autocompletionTextField($this, "ldap_group_dn");
         echo "</td></tr>";
     }
     $options = array('colspan' => 1, 'candel' => false);
     $this->showFormButtons($options);
 }
开发者ID:korial29,项目名称:glpi,代码行数:34,代码来源:group.class.php

示例5: showLDAPForm

 function showLDAPForm($target, $ID)
 {
     global $LANG;
     if (!haveRight("group", "r")) {
         return false;
     }
     if ($ID > 0) {
         $this->check($ID, 'r');
     } else {
         // Create item
         $this->check(-1, 'w');
     }
     echo "<form name='groupldap_form' id='groupldap_form' method='post' action='{$target}'>";
     echo "<div class='spaced'><table class='tab_cadre_fixe'>";
     if (haveRight("config", "r") && AuthLdap::useAuthLdap()) {
         echo "<tr class='tab_bg_1'>";
         echo "<td colspan='2' class='center'>" . $LANG['setup'][256] . "&nbsp;:&nbsp;</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . $LANG['setup'][260] . "&nbsp;:&nbsp;</td>";
         echo "<td>";
         autocompletionTextField($this, "ldap_field");
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . $LANG['setup'][601] . "&nbsp;:&nbsp;</td>";
         echo "<td>";
         autocompletionTextField($this, "ldap_value");
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td colspan='2' class='center'>" . $LANG['setup'][257] . "&nbsp;:&nbsp;</td>";
         echo "</tr>";
         echo "<tr class='tab_bg_1'>";
         echo "<td>" . $LANG['setup'][261] . "&nbsp;:&nbsp;</td>";
         echo "<td>";
         autocompletionTextField($this, "ldap_group_dn");
         echo "</td></tr>";
     }
     $options = array('colspan' => 1, 'candel' => false);
     $this->showFormButtons($options);
     echo "</table></div></form>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:40,代码来源:group.class.php

示例6: title

 /**
  * Print a good title for user pages
  *
  * @return nothing (display)
  **/
 function title()
 {
     global $LANG, $CFG_GLPI;
     $buttons = array();
     $title = $LANG['Menu'][14];
     if ($this->canCreate()) {
         $buttons["user.form.php?new=1"] = $LANG['setup'][2];
         $title = "";
         if (Auth::useAuthExt()) {
             // This requires write access because don't use entity config.
             $buttons["user.form.php?new=1&amp;ext_auth=1"] = $LANG['setup'][125];
         }
     }
     if (haveRight("import_externalauth_users", "w")) {
         if (AuthLdap::useAuthLdap()) {
             $buttons["ldap.php"] = $LANG['setup'][3];
         }
     }
     displayTitle($CFG_GLPI["root_doc"] . "/pics/users.png", $LANG['Menu'][14], $title, $buttons);
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:25,代码来源:user.class.php


注:本文中的AuthLdap::useAuthLdap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。