changed: better use of Elgg core function (requires Elgg 1.8.9+)