Exemplo n.º 1
0
 public function IndexAction()
 {
     $em = $this->getDoctrine()->getEntityManager();
     try {
         $adldap = new adLDAP();
         $adldap->authenticate('rlesaffre_stage', '');
         $versionCarto = $em->getRepository('DeveloppementCartopliBundle:Installation')->getVersionCarto();
         return $this->render('DeveloppementCartopliBundle:Default:acces.html.twig', array('versionCarto' => $versionCarto));
     } catch (adLDAPException $e) {
         echo $e;
         exit;
     }
 }
Exemplo n.º 2
0
 /**
  * Validate a user's login credentials
  * 
  * @param string $username A user's AD username
  * @param string $password A user's AD password
  * @param bool optional $prevent_rebind
  * @return bool
  */
 public function authenticate($username, $password, $preventRebind = false)
 {
     return $this->adldap->authenticate($username, $password, $preventRebind);
 }