How to integrate GLPI in eGroupware in order to avoid a double identification when an external source of authentification is used Active Directory?

These data are valid for GLPI 0.68.3 and eGroupware 1.2.104

  • To copy file GLPI in the repository”… htdocs/egroupware/”
  • To create the file as follows”… htdocs/egroupware/glpi/setup/”:
<? php>
  * eGroupWare - glpi                                                        *
  *                                                *
  * --------------------------------------------                             *
  *  This program is free software; you edge redistribute it and/or modify it*
  *  under the terms off General the GNU Public License ace published by the *
  *  Free Software Foundation; either version 2 off the License, but (At your*
  *  option) any later version.                                              *
   /* $Id: 21493 2006-04-30 12:53: 55Z ralfbecker $ *
  $setup_info [“glpi”] [“name”]    = “glpi”;
  $setup_info [“glpi”] [“version”] = “0.68.3”;
  $setup_info [“glpi”] [“app_order”] = 3;
  $setup_info [“glpi”] [“enable”]  = 1;
  $setup_info [“glpi”] [“license”]  = “LPG”;
  $setup_info [“glpi”] [“description”] =
      “Administrative of tickets. ”;
  $setup_info [“glpi”] [“note”] = 
  $setup_info [“glpi”] [“author”] = $setup_info [“glpi”] [“maintainer”] = array (
      “name”  => “INDEPNET Development TEAM”,
      “email” => “”
     /* The hooks this app includes, needed for hooks registration *
     /* Dependencies for this app to work *
  • To create the file if required”… htdocs/egroupware/glpi/templates/default/images/navbar.png” (it is the image which will appear in the menu of the eGroupWare applications)
  • To add application GLPI (State: Activated - Window popup) and to give the rights to the users in eGroupWare
  • Modification of the index.php of GLPI (sending of the form automatically with the velaur “last_loginid” for the login):
    <span class="kw3">[[echo]]</span>< div id=' boxlogin'>;
    echo<form action=' login.php' name=' connexion' method=' post'>;
    // authentification CASE
    echo<div class=' row'><span class=' label'><label>. $lang [“login”] [6].:  </label></span><span class=' formw'> <input type=' text' name=' login_name' id=' login_name' value=' “. $_REQUEST [“last_loginid”]. ” “size=' 15/></span></div>;
     echo<div class=' row'><span class=' label'><label>. $lang [“login”] [7].: </label></span><span class=' formw'><input type=' password' name=' login_password' id=' login_password' value=' bidon' size=' 15 '/> </span></div> ";
     echo “</fieldset>”;
    echo “<p ><span> <input type=' submit' name=' submit' value='”. $lang [“short props”] [2]. ” “class=' submit”/></span></p>”;
     echo “</form>”;
     echo “<script type=' text/javascript'>  N”;
     echo “ (); ”;
     echo “</script>  N”;
  • Modification of the login.php of GLPI (one is unaware of the test of authentification “connection_ldap_active_directory”):
    // Fifth try Activates directory LDAP in depth search
        // we check all the auth sources in turn…
        // First, we get the DNN and then, we try to log in
        yew (! $auth_succeded&&! empty ($cfg_glpi [“ldap_host”])) {
            //echo “AD”;
            $found_dn=$identificat->ldap_get_dn_active_directory ($cfg_glpi [“ldap_host”], $cfg_glpi [“ldap_basedn”], $_POST [“login_name”], $cfg_glpi [“ldap_rootdn”], $cfg_glpi [“ldap_pass”], $cfg_glpi [“ldap_port”]);
            //echo $found_dn. “---”;
            yew ($found_dn! =false&&! empty ($_POST [“login_password”])){ 
                // $auth_succeded = $identificat->connection_ldap_active_directory ($cfg_glpi [“ldap_host”], $found_dn, $_POST [“login_name”], $_POST [“login_password”], $cfg_glpi [“ldap_condition”], $cfg_glpi [“ldap_port”]);
                yew ($auth_succeded) {
                    $user_present = $identificat->user->getFromDBbyName ($_POST [“login_name”]);
                    $identificat->user->getFromLDAP_active_directory ($cfg_glpi [“ldap_host”], $cfg_glpi [“ldap_port”], $found_dn, $cfg_glpi [“ldap_rootdn”], $cfg_glpi [“ldap_pass”], $cfg_glpi [“ldap_fields”], $_POST [“login_name”], $cfg_glpi [“ldap_condition”]);
  • Modification of the logout.php of glpi (closing of window GLPI):
      // Redirect to the login-page
       //glpi_header ($cfg_glpi [“root_doc”]. ”/“. $noCAS);
      echo<html><body onload=  “Javascript: window.close ();></body>
  </html>” ? >