Skip to content

Commit e313391

Browse files
committed
When updating a user, the objectClasses may be updated. Maybe move this function to the reviewUser view and only modify the object class when the objectClass retrieved are differents than the objectClass defined at the config file
1 parent e776d24 commit e313391

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Storage/LdapMod.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public function updateUser($userId, $userInfo) {
154154
$this->adminBindLdap();
155155
if($this->searchfordn($this->searchBase, $this->userIdAttr, $userId, TRUE) ){
156156
// User found in the catalog
157+
$userInfo['objectClass'] = $this->objectClass;
157158
$this->replaceAttribute($dn, $userInfo);
158159
}else{
159160
// User not found
@@ -289,7 +290,7 @@ private function replaceAttribute($dn, $entry){
289290
throw new sspmod_userregistration_Error_UserException('id_violation');
290291
}
291292
else {
292-
throw new Exception($error_msg);
293+
throw new Exception($error_msg.var_export($entry, TRUE).var_export($dn, TRUE));
293294
}
294295
}
295296
}

0 commit comments

Comments
 (0)