Commit 0f531665 authored by Donal McMullan's avatar Donal McMullan
Browse files

Switch to using $USER->__get

parent f9f6868e
......@@ -48,8 +48,6 @@ else {
}
$tags = param_variable('tags');
$userid = $USER->get('id');
safe_require('artefact', 'blog');
......@@ -75,9 +73,9 @@ $postobj->set('tags', preg_split("/\s*,\s*/", trim($tags)));
$postobj->set('published', !$draft);
if (!$blogpost) {
$postobj->set('parent', $blog);
$postobj->set('owner', $userid);
$postobj->set('owner', $USER->id);
}
else if ($postobj->get('owner') != $userid) {
else if ($postobj->get('owner') != $USER->id) {
json_reply('local', get_string('youarenottheownerofthisblogpost', 'artefact.blog'));
}
$postobj->commit();
......
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