public function testGetUserByUsername() { // grab a user foreach ($this->entities as $e) { if (elgg_instanceof($e, 'user')) { break; } } $result = elgg_get_entities_from_attributes(array('type' => 'user', 'attribute_name_value_pairs' => array('name' => 'username', 'value' => $e->username))); $this->assertEqual($e->guid, $result[0]->guid); }
/** * Get succeeding messages * * @param array $options Additional options * @return mixed */ public function getMessagesAfter(array $options = array()) { $options['wheres'][] = "e.guid > {$this->message->guid}"; return elgg_get_entities_from_attributes($this->getFilterOptions($options)); }