Commit 1560013e authored by Son Nguyen's avatar Son Nguyen
Browse files

Fix a bug in Collection::_construct($data)



if no owner info is passed via $data
$collection->owner will be set to $USER->get('id')

Change-Id: Ieb7d19b13bb84de1c3587d1eb374a1617182085a
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 7f2cda97
......@@ -72,6 +72,10 @@ class Collection {
$this->{$field} = $value;
}
}
if (empty($this->group) && empty($this->institution) && empty($this->owner)) {
global $USER;
$this->owner = $USER->get('id');
}
}
public function get($field) {
......
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