當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。