$ent = new ElggObject();
$ent->subtype = 'object';
$ent->subtype = 'object_subtype';
$ent->title = 'title';
$ent->description = 'description';
$ent->access_id = ACCESS_PUBLIC;
$ent->owner_guid = 1;
$ent->container_guid = 1;
$ent->site_guid = 1;
$ent->save();
This works. But I've got a message: "Unable to save new object's base entity information!"
It seems that I have to be logged in, but how can I log in through console?
Two things:
Thanks, Brett!
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.