Useful information to pull out: Revision

Last updated by Ben Werdmuller

Here are a couple of things we've done in various places that might be useful to you.

Pull out the latest users who have uploaded avatars

When a user uploads an avatar, a piece of metadata called icontime is set, which stores the UNIX epoch timestamp of the time they uploaded it. This is used for caching purposes; each profile icon shows up as {timestamp}.jpg, so that browsers can cache effectively.

You can use this to bring out the latest users who have uploaded avatars, as we do here on Community:

$newest_members = get_entities_from_metadata('icontime', '', 'user', '', 0, 20);

The above code will get the entities for the 20 most recent users. If you only wanted to bring out OpenID users, for example, you could set the subtype field (OpenID users have subtype 'openid'):

$newest_members = get_entities_from_metadata('icontime', '', 'user', 'openid', 0, 20);

Ben Werdmuller

I co-founded Elgg. Since then, I've cofounded Elgg, worked for Medium, was Director of Investments at Matter Ventures, and led technology at The 19th*.

History