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
fa94eba6
Commit
fa94eba6
authored
May 20, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
May 20, 2015
Browse files
Merge "Ensure dummy admin email is changed on install (Bug #1378581)"
parents
c5895f82
d6cd9242
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/cli/install.php
View file @
fa94eba6
...
...
@@ -80,6 +80,10 @@ $userobj = $userobj->find_by_username('admin');
$userobj
->
email
=
$adminemail
;
$userobj
->
commit
();
// Ensure that the dummy admin email is changed
update_record
(
'artefact_internal_profile_email'
,
array
(
'email'
=>
$adminemail
),
array
(
'owner'
=>
$userobj
->
id
));
update_record
(
'artefact'
,
array
(
'title'
=>
$adminemail
),
array
(
'owner'
=>
$userobj
->
id
,
'artefacttype'
=>
'email'
));
// Password changes should be performed by the authfactory
$authobj
=
AuthFactory
::
create
(
$userobj
->
authinstance
);
$authobj
->
change_password
(
$userobj
,
$adminpassword
,
true
);
...
...
htdocs/auth/lib.php
View file @
fa94eba6
...
...
@@ -1023,6 +1023,7 @@ function requiredfields_submit(Pieform $form, $values) {
// 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'
)));
update_record
(
'artefact'
,
array
(
'title'
=>
$email
),
array
(
'owner'
=>
$USER
->
get
(
'id'
),
'artefacttype'
=>
'email'
));
}
}
// Check if a validation email has been sent, if not send one
...
...
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