src/snac/server/database/SQL.php
/**
     * Select all user IDs in group
     *
     * @param integer $groupID A group id
     *
     * @param boolean $everyone If true include inactive users, else only list active.
     *
     * @return integer[] List of group ID values.
     */
Select all user IDs in group
@param integer $groupID A group id

@param boolean $everyone If true include inactive users, else only list active.

@return integer[] List of group ID values.
Select all user IDs in group @param integer $groupID A group id @param boolean $everyone If true include inactive users else only list active . @return integer [] List of group ID values .
public function selectUserIDsFromGroup($groupID, $everyone)
    {
        $query = "select uid from appuser_group_link where gid=$1";
        if (! $everyone) {
            $query = "select agl.uid from appuser_group_link as agl, appuser where gid=$1 and agl.uid=appuser.id and appuser.active";
        }
        $result = $this->sdb->query($query,
                                    array($groupID));
        $all = array();
        while ($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row['uid']);
        }
        return $all;
    }
public function selectUserIDsFromGroup ( $ groupID , $ everyone ) { $ query = " select uid from appuser_group_link where gid=$1 " ; if ( ! $ everyone ) { $ query = " select agl.uid from appuser_group_link as agl, appuser where gid=$1 and agl.uid=appuser.id and appuser.active " ; } $ result = $ this -> sdb -> query ( $ query , array ( $ groupID ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row [ 'uid' ] ) ; } return $ all ; }
Select all user IDs in group
 @param integer $groupID A group id
Select all user IDs in group @param integer $groupID A group id
/*
             * Must join with appuser to get only active users.
             *
             * Table names are not necessary in the select or where clause. The field names are
             * unique. However, explicitly using table names (or the alias agl) makes the intent clear.
             */