Example #1
0
 /**
  * Deletes the user from the LDAP directory.
  *
  * @param   array  $options  Optional array of options.
  *
  * @return  boolean  True on success or False on error.
  *
  * @since   2.0
  */
 public function delete($options = array())
 {
     $this->getId(false);
     // Ensure proxy binded
     if ($this->client->bindStatus !== SHLdap::AUTH_PROXY) {
         if (!$this->client->proxyBind()) {
             // Failed to map as a proxy user
             throw new RuntimeException(JText::_('LIB_SHUSERADAPTERSLDAP_ERR_10901'), 10901);
         }
     }
     $this->client->delete($this->_dn);
     $this->_dn = new RuntimeException(JText::_('LIB_SHUSERADAPTERSLDAP_ERR_10906'), 10906);
     return true;
 }