Elgg sends a 302 at the end of every action. The php function that Elgg defines is called forward(). The redirect takes the user to the new page after the action completes.
For ajax actions, I put an exit at the end of the action script to prevent the forward from occuring. Elgg needs to provide better ajax support. This is a known issue. There have been some discussions on this in the Elgg developers group recently: http://groups.google.com/group/elgg-development/browse_thread/thread/4ebd259f1e194f10
Thank you so much!! This is exactly what I needed.
No, never put user ids in metadata as the system will not be able to respond properly if those users are deleted. Use relationships for that.
There is plenty of API documentation avaialble in the docs area, but personally I just read the source code in engine/lib. Most of it is clearly documented.
In particular, see add_entity_relationship in engine/lib/relationships.php
@Ezhi - I agree with Kevin - make the event an ElggObject and the users who attend the event have a relationship with that object. There are then some simple methods to do things like get a list of all people who attended an event.
oh, got it! I see what you mean! Somehow I didn't make the leap from a connection between 2 users, to a connection between a user and an event, and another user and the same event! This way, 2 users are connected through the event.
Thanks! :)
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.