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
12fd5b78
Commit
12fd5b78
authored
Apr 09, 2014
by
Son Nguyen
Committed by
Gerrit Code Review
Apr 09, 2014
Browse files
Merge "Installation doesn't save email address (Bug #1300741)"
parents
5dce1c5f
8ff3e3f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/lib.php
View file @
12fd5b78
...
...
@@ -999,6 +999,15 @@ function requiredfields_submit(Pieform $form, $values) {
}
if
(
$field
==
'email'
)
{
$email
=
$values
[
'email'
];
// Need to update the admin email on installation
if
(
$USER
->
get
(
'id'
)
==
'1'
)
{
$oldemail
=
get_field
(
'usr'
,
'email'
,
'id'
,
$USER
->
get
(
'id'
));
if
(
$oldemail
==
'admin@example.org'
)
{
// we are dealing with the dummy email that is set on install
update_record
(
'usr'
,
array
(
'email'
=>
$email
),
array
(
'id'
=>
$USER
->
get
(
'id'
)));
update_record
(
'artefact_internal_profile_email'
,
array
(
'email'
=>
$email
),
array
(
'owner'
=>
$USER
->
get
(
'id'
)));
}
}
// Check if a validation email has been sent, if not send one
if
(
!
record_exists
(
'artefact_internal_profile_email'
,
'owner'
,
$USER
->
get
(
'id'
)))
{
$key
=
get_random_key
();
...
...
Write
Preview
Markdown
is supported
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