protected function _setData($gid, $attribute, $value = null)
{
if ($this->readOnly()) {
throw new Horde_Group_Exception('This group backend is read-only.');
}
$attributes = is_array($attribute) ? $attribute : array($attribute => $value);
try {
$entry = $this->_ldap->getEntry($gid);
foreach ($attributes as $attribute => $value) {
switch ($attribute) {
case 'name':
$attribute = $this->_params['gid'];
break;
case 'email':
$attribute = 'mail';
break;
}
$entry->replace(array($attribute => $value));
}
$this->_rebind(true);
$entry->update();
$this->_rebind(false);
} catch (Horde_Ldap_Exception $e) {
throw new Horde_Group_Exception($e);
}
}