updated for Elgg 1.9