Commit eb8fcedf authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1629105: Update the option 'Multiple journals' in session"

parents 47f038fb ff3db865
......@@ -428,6 +428,7 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
* Deletes the default blog that is created for all users
*/
public static function cleanup(PluginImportLeap $importer) {
global $USER;
if (self::$importedablog && self::$firstblogid) {
$blog = artefact_instance_from_id(self::$firstblogid);
if (!$blog->has_children()) { // TODO see #544160
......@@ -437,6 +438,9 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
$userid = $importer->get('usr');
if (count_records('artefact', 'artefacttype', 'blog', 'owner', $userid) != 1) {
set_account_preference($userid, 'multipleblogs', 1);
if ($userid == $USER->get('id')) {
$USER->set_account_preference('multipleblogs', 1);
}
}
}
......
Supports Markdown
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