$this->_w(__FUNCTION__.' node dn where to put the user was not found; set a value DnUserNode in ldap config or set it as 2nd parameter '.print_r($aItem,1));
returnfalse;
}
/**
* delete a user
* this requires a ldap bind with master/ admin account
*
* @param string $sUser user to update
* @param string $sPW new password to set
* @return boolean
*/
publicfunctionuserDelete($sUserDn){
$this->_w(__FUNCTION__.'('.$sUserDn.')');
return$this->objDelete($sUserDn);
}
/**
* update an ldap object
* this requires a ldap bind with master/ admin account
*
* @param array $aItem new user data to update
* @return boolean
*/
publicfunctionuserUpdate($aItem){
$this->_w(__FUNCTION__.'([array])');
$sDn=$this->getUserDn($aItem['uid']);
if($sDn){
if(array_key_exists('cn',$aItem)){
$this->_w(__FUNCTION__.' deleting cn entry.');
unset($aItem['cn']);
}
return$this->objUpdate($sDn,$aItem);
}
$this->_w(__FUNCTION__.' dn not found (user does not exist in ldap) '.$sDn);