Hi all,
I'm catching the delete relationship event and running a check from another plugin with the following:
register_elgg_event_handler('delete', 'my_course', 'LiHaiCredits_pay');
function LiHaiCredits_pay($event, $object_type, $object){$user = get_entity($object['guid_one']); // (line 134)$course = get_entity($object['guid_two']);...
function LiHaiCredits_reserve($event, $object_type, $object){$user = get_entity($object['guid_one']);$course = get_entity($object['guid_two']);
object(stdClass)#199 (5) { ["id"]=> string(4) "1378" ["guid_one"]=> string(1) "2" ["relationship"]=> string(9) "my_course" ["guid_two"]=> string(4) "1750" ["time_created"]=> string(10) "1332518468" }
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.
- Trajan@Trajan
Trajan - 0 likes
You must log in to post replies.problem solved...
it works when I use $object->guid_one instead of $object['guid_one'].
Strange that for creating a relationship it works in array format but for deleting it doesn't.