Updated for Elgg 1.8