Commit b0111575 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Create admin public folder without an owner

parent de0b64b4
......@@ -962,12 +962,11 @@ class ArtefactTypeFolder extends ArtefactTypeFileBase {
AND a.parent IS NULL", array($name, 'folder'));
if (!$folderid) {
global $USER;
if (get_field('usr', 'admin', 'id', $USER->id)) {
if ($USER->get('admin')) {
$description = get_string_from_language(get_config('lang'),
'adminpublicdirdescription', 'admin');
$data = (object) array('title' => $name,
'description' => $description,
'owner' => $USER->id,
'institution' => 'mahara');
$f = new ArtefactTypeFolder(0, $data);
$f->commit();
......
Markdown is supported
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