} else {
$fields = explode($separator, $base);
}
- return isset($fields[$this->attributes[$attr]['order']]) ? $fields[$this->attributes[$attr]['order']] : null;
+ return isset($fields[$this->attributes[$attr]['order']]) ? $this->unquote($fields[$this->attributes[$attr]['order']]) : null;
}
/**
$result = '';
for ($i = 0; $i < $empty; $i++) {
$akey = array_shift($attributes);
- //FIXME: We don't handle multiple values correctly here
$value = isset($info[$akey]) ? $info[$akey] : '';
if (is_array($value)) {
$value = $value[0];
}
/**
- * Quote field separaotrs within a LDAP value.
+ * Quote field separators within a LDAP value.
*
* @param string $string The string that should be quoted.
*
}
}
- foreach ($collapse as $key => $attributes) {
- $this->collapse($key, $attributes, $info);
- }
-
if (!$this->exists()) {
foreach ($this->attribute_map['required'] as $key) {
if (!in_array($key, array_keys($info)) || $info[$key] === null
}
}
+ foreach ($collapse as $key => $attributes) {
+ $this->collapse($key, $attributes, $info);
+ }
+
$result = $this->server->save($this->uid, $info, $this->exists());
if (!$this->_exists) {