Jul
25th
by
Ben Werdmuller

Events and auditing in Elgg

One of the core features of Elgg 1.0 is a pair of functions: the event API and the system log. An event in Elgg is an event that is triggered by the user. For example, a blog post might be created, a profile updated, a friend connection established or comment wall note left.

Hooking functionality onto these is incredibly useful for auditing purposes, but it also offers a range of other possibilities.

Each time one of these things happens, Elgg saves it to the system log. This powers the events river - the list of recent actions you'll find in your dashboard or on your profile - but it also provides a powerful auditing stream. It's possible to determine who performed what action on which entity, when.

However, Elgg also triggers an event call. Plugins have the ability to hook onto events by event type or entity type, or a subset of those (or, indeed, all events). Once their interest is registered in something, every time that particular event occurs, they get notified and a copy of the entity in question is sent to them.

In certain situations (for example education), a very detailed auditing procedure is necessary, for legal reasons or otherwise. Those users now have the ability to use a plugin that will store an indelible copy of each entity when it has an action performed on it, as well as a record of the user that performed the action and when it occurred. In this way, using such a plugin, previous (or deleted) versions of an object can be retrieved.

The events system has other implications beyond auditing, of course. If you need to check for offensive content, you could have a plugin that performs a check on saved content. We have some plans for Elgg 1.5 that make heavy use of events, in order to keep you better informed about what's happening in your friends network. An enterprise might want to sent XMPP pings about certain events. There are lots of possibilities, and we'll be releasing more functionality along these lines as time goes on.

elgg.org

elgg.com

Archive

No archives available yet