...
 
Commits (6)
......@@ -6,6 +6,7 @@
top: 32px;
box-sizing: border-box;
max-height: 80%;
max-width: 155px;
}
.plugin-section#perso > div > table {
......
......@@ -255,4 +255,29 @@ class UserPasswordAttribute extends CompositeAttribute
{
return $this->attributes[4]->getValue();
}
/*! \brief Apply value from RPC requests
*
* \param mixed $value the value
*/
function deserializeValue ($value)
{
if ($this->disabled) {
return parent::deserializeValue($value);
}
if (is_array($value)) {
if (count($value) > 5) {
return sprintf(_('Too many elements in array value for password field %s: %d instead of %d'), $this->getLdapName(), count($value), 5);
} elseif (count($value) < 5) {
return sprintf(_('Not enough elements in array value for password field %s: %d instead of %d'), $this->getLdapName(), count($value), 5);
} elseif (!isset($value[0])) {
return sprintf(_('Array value for password field %s must have numeric keys'), $this->getLdapName());
}
$this->setValue($value);
} elseif (is_string($value)) {
$this->setValue(['', $value, $value, '', FALSE]);
} else {
return sprintf(_('Invalid value type for password field %s, must be array or string'), $this->getLdapName());
}
}
}
......@@ -99,6 +99,11 @@ class user extends simplePlugin
'givenName', TRUE,
'', '', '/^[^,+"?()=<>;\\\\]+$/'
),
new StringAttribute(
_('Initials'), _('The initials of some or all of the individual\'s names, but not the surname(s)'),
'initials', FALSE,
'', '', '/^[^,+"?()=<>;\\\\]+$/'
),
new TextAreaAttribute(
_('Description'), _('Short description of the user'),
'description', FALSE
......