Commit ea2e289b authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '6034-applying-a-template-to-a-user-removes-the-mail-tab' into '1.4-dev'

Resolve "Applying a template to a user removes the mail tab"

See merge request fusiondirectory/fd!685
parents 92c725cb e045eea7
......@@ -464,9 +464,9 @@ class templateHandling
* \param array $args the parameters
* \param mixed $str the string or array to apply the modifier on
* \return array an array of possible values
* \return iterable an array or iterable object of possible values
* */
protected static function applyModifier (string $m, array $args, $str): array
protected static function applyModifier (string $m, array $args, $str)
......@@ -383,9 +383,11 @@ class user extends simplePlugin
if ($this->uid != '') {
$skip[] = 'uid';
parent::adapt_from_template($attrs, array_merge($skip, ['userPassword']));
if (isset($this->attrs['userPassword']) && !in_array('userPassword', $skip)) {
$this->userPassword = $this->attributesAccess['userPassword']->readUserPasswordValues($this->attrs['userPassword'][0], TRUE);
if (isset($attrs['userPassword']) && !in_array('userPassword', $skip)) {
$this->userPassword = $this->attributesAccess['userPassword']->readUserPasswordValues($attrs['userPassword'][0], TRUE);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment