Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
110b4f19
Commit
110b4f19
authored
Nov 27, 2020
by
Lisa Seeto
Committed by
Gerrit Code Review
Nov 27, 2020
Browse files
Merge "Bug 1905624: Make sure expiry part of message is in correct language"
parents
532ad838
aaf4b0f1
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/auth/lib.php
View file @
110b4f19
...
...
@@ -3217,22 +3217,22 @@ function auth_register_submit(Pieform $form, $values) {
}
require_once
(
get_config
(
'libroot'
)
.
'pieforms/pieform/elements/expiry.php'
);
// email each admin
// @TODO Respect the notification preferences of the admins.
foreach
(
$admins
as
$admin
)
{
$adminuser
=
new
User
();
$adminuser
->
find_by_id
(
$admin
);
$ownerlang
=
get_user_language
(
$adminuser
->
get
(
'id'
));
$expirytime
=
pieform_element_expiry_get_expiry_from_seconds
(
get_config
(
'defaultregistrationexpirylifetime'
));
if
(
$expirytime
==
null
)
{
$expirystring
=
get_config
(
'defaultregistrationexpirylifetime'
)
.
' '
.
get_string
(
'seconds'
,
'performance'
);
$expirystring
=
get_config
(
'defaultregistrationexpirylifetime'
)
.
' '
.
get_string
_from_language
(
$ownerlang
,
'seconds'
,
'performance'
);
}
else
if
(
$expirytime
[
'units'
]
==
'noenddate'
)
{
$expirystring
=
get_string
(
'element.expiry.noenddate'
,
'pieforms'
);
$expirystring
=
get_string
_from_language
(
$ownerlang
,
'element.expiry.noenddate'
,
'pieforms'
);
}
else
{
$expirystring
=
get_string
(
'element.expiry.'
.
$expirytime
[
'units'
]
.
'.lowercase'
,
'pieforms'
,
$expirytime
[
'number'
],
$expirytime
[
'number'
]);
$expirystring
=
get_string
_from_language
(
$ownerlang
,
'element.expiry.'
.
$expirytime
[
'units'
]
.
'.lowercase'
,
'pieforms'
,
$expirytime
[
'number'
],
$expirytime
[
'number'
]);
}
// email each admin
// @TODO Respect the notification preferences of the admins.
foreach
(
$admins
as
$admin
)
{
$adminuser
=
new
User
();
$adminuser
->
find_by_id
(
$admin
);
$ownerlang
=
get_user_language
(
$adminuser
->
get
(
'id'
));
email_user
(
$adminuser
,
null
,
get_string_from_language
(
$ownerlang
,
'pendingregistrationadminemailsubject'
,
'auth.internal'
,
$institution
->
displayname
,
get_config
(
'sitename'
)),
get_string_from_language
(
$ownerlang
,
'pendingregistrationadminemailtext'
,
'auth.internal'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment