index 0180a8529a50fc25e108417911f1fecfdd84d9ad..692feb5e82481b2cee96d093ab56f93a5c28c22d 100644 (file)
*/
function handle_pre_events($mode, $addAttrs= array())
{
- if(!in_array($mode, array('add','remove','modify'))){
+ if(!in_array_strict($mode, array('add','remove','modify'))){
trigger_error(sprintf("Invalid pre event type given %s! Valid types are [add,modify,remove].", $mode));
return;
}
foreach($this->attributes as $name){
// Skip the ones in skip list
- if (in_array($name, $skip)) continue;
+ if (in_array_strict($name, $skip)) continue;
if (!isset($this->attrs[$name]['count'])) continue;
$value= $this->attrs[$name][0];
// Update 'manager' attributes from gosaDepartment and inetOrgPerson
$filter = "(&(objectClass=inetOrgPerson)(manager=".LDAP::prepare4filter(LDAP::fix($src_dn))."))";
$ocs = $ldap->get_objectclasses();
- if(isset($ocs['gosaDepartment']['MAY']) && in_array('manager', $ocs['gosaDepartment']['MAY'])){
+ if(isset($ocs['gosaDepartment']['MAY']) && in_array_strict('manager', $ocs['gosaDepartment']['MAY'])){
$filter = "(|".$filter."(&(objectClass=gosaDepartment)(manager=".LDAP::prepare4filter(LDAP::fix($src_dn)).")))";
}
$leaf_deps= get_list($filter,array("all"),$this->config->current['BASE'],
if(count($this->objectclasses)){
$this->is_account = TRUE;
foreach($this->objectclasses as $class){
- if(!in_array($class,$source['objectClass'])){
+ if(!in_array_strict($class,$source['objectClass'])){
$this->is_account = FALSE;
}
}
{
$ret = array();
foreach($this->attributes as $attr){
- if(in_array($attr,$this->multi_boxes)){
+ if(in_array_strict($attr,$this->multi_boxes)){
$ret[$attr] = $this->$attr;
}
}
*/
function handle_post_events($mode, $addAttrs= array())
{
- if(!in_array($mode, array('add','remove','modify'))){
+ if(!in_array_strict($mode, array('add','remove','modify'))){
trigger_error(sprintf("Invalid post event type given %s! Valid types are [add,modify,remove].", bold($mode)));
return;
}