Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
e045eea7
Unverified
Commit
e045eea7
authored
5 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(templates) Fix problems with adapt_from_template
issue
#6034
parent
92c725cb
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class_templateHandling.inc
+2
-2
include/class_templateHandling.inc
plugins/personal/generic/class_user.inc
+4
-2
plugins/personal/generic/class_user.inc
with
6 additions
and
4 deletions
+6
-4
include/class_templateHandling.inc
+
2
−
2
View file @
e045eea7
...
@@ -464,9 +464,9 @@ class templateHandling
...
@@ -464,9 +464,9 @@ class templateHandling
* \param array $args the parameters
* \param array $args the parameters
* \param mixed $str the string or array to apply the modifier on
* \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
)
{
{
mb_internal_encoding
(
'UTF-8'
);
mb_internal_encoding
(
'UTF-8'
);
mb_regex_encoding
(
'UTF-8'
);
mb_regex_encoding
(
'UTF-8'
);
...
...
This diff is collapsed.
Click to expand it.
plugins/personal/generic/class_user.inc
+
4
−
2
View file @
e045eea7
...
@@ -383,9 +383,11 @@ class user extends simplePlugin
...
@@ -383,9 +383,11 @@ class user extends simplePlugin
if
(
$this
->
uid
!=
''
)
{
if
(
$this
->
uid
!=
''
)
{
$skip
[]
=
'uid'
;
$skip
[]
=
'uid'
;
}
}
parent
::
adapt_from_template
(
$attrs
,
array_merge
(
$skip
,
[
'userPassword'
]));
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
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets