It is possible, to update an objects metadata with an another user?
I tried to create the objet with the logged in user's guid in the object's owner_guid propertie.
and I tried to create the object with the owner_guid 0.
I found in both cases, that I cant update this object with an another user. I get an error is I trye to use $my_object->save();
How can I do this case right? I have to modify an object which is created by a user who can be anyone.
I thought, that the owner_guid = 0 is used for this, but maybe not.
Can somebody help me please?
(Sorry for my bad english!)
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.
- Andras Szepeshazi@aszepeshazi

Andras Szepeshazi - 0 likes
- Trajan@Trajan

Trajan - 0 likes
You must log in to post replies.Wrap your code where you try to save an object in another user's name into
(your code comes here)
This will override the default protection that would not let you edit objects owned by other users.
Andras has the right idea. You MUST make sure you bring the elgg_set_ignore_access back to false afterwards otherwise your site becomes somewhat "unprotected".