We have moved to Github. Please open tickets there.

#4488 closed Defect (duplicate)

Expose entity type attributes in getters

Reported by: brettp Owned by:
Priority: normal Milestone: Needs Review
Component: Core Version: 1.8
Severity: minor Keywords:
Cc: brett@… Difficulty: moderate

Description (last modified by brettp)

I understand we don't load the attributes until the object is instantiated, but this makes doing simple things like getting a list of admin users overly complicated:

$db_prefix = elgg_get_config('dbprefix');
$admins = elgg_get_entities(array(
	'type' => 'user',
	'wheres' => "{$db_prefix}users_entity.admin = 'yes'",
	'joins' => "JOIN {$db_prefix}users_entity ON {$db_prefix}users_entity.guid = e.guid"
));

Change History (2)

comment:1 Changed 13 months ago by brettp

  • Description modified (diff)

comment:2 Changed 12 months ago by ewinslow

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate but I can't find the other ticket.

Note: See TracTickets for help on using tickets.