class_ldap.inc 46.19 KiB
<?php
/*
  This code is part of FusionDirectory (http://www.fusiondirectory.org/)
  Copyright (C) 2003-2010  Cajus Pollmeier
  Copyright (C) 2003 Alejandro Escanero Blanco <aescanero@chaosdimension.org>
  Copyright (C) 1998  Eric Kilfoil <eric@ipass.net>
  Copyright (C) 2011-2016  FusionDirectory
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
/*!
 * \file class_ldap.inc
 * Source code for Class LDAP
/*!
 * \brief This class contains all ldap function needed to make
 * ldap operations easy
class LDAP
  var $hascon         = FALSE;
  var $reconnect      = FALSE;
  var $tls            = FALSE;
  /**
   * Connection identifier
   * @var resource|object|false
  var $cid            = FALSE;
  var $hasres         = [];
  var $sr             = [];
  var $re             = [];
  var $basedn         = "";
  /* 0 if we are fetching the first entry, otherwise 1 */
  var $start          = [];
  /* Any error messages to be returned can be put here */
  var $error          = "";
  var $srp            = 0;
  /* Information read from slapd.oc.conf */
  var $objectClasses    = [];
  /* the dn for the bind */
  var $binddn           = "";
  /* the dn's password for the bind */
  var $bindpw           = "";
  var $hostname         = "";
  var $follow_referral  = FALSE;
  var $referrals        = [];
  /* 0, empty or negative values will disable this check */