Exemple #1
0
 public function testUserIDs()
 {
     $this->list->sortByUserID();
     $this->assertEquals(3, $this->list->getTotalResults());
     $results = $this->list->getResultIDs();
     $this->assertEquals(3, count($results));
     $this->assertEquals(1, $results[0]);
     $this->assertEquals(2, $results[1]);
     $this->assertEquals(3, $results[2]);
 }
 private function getEmailAdressesByGroupId($gId)
 {
     $db = \Database::connection();
     $grp = new UserList();
     $grp->filterByGroupID($gId);
     $list = $grp->getResultIDs();
     $mailads = array();
     foreach ($list as $uID) {
         array_push($mailads, $db->fetchColumn('SELECT uEmail FROM Users WHERE uID = ?', [$uID]));
     }
     return $mailads;
 }
 /**
  * similar to get except it returns an array of userIDs
  * much faster than getting a UserInfo object for each result if all you need is the user's id
  * @return array $userIDs
  */
 public function getResultIDs()
 {
     return parent::getResultIDs();
 }