if (!$sortByLastActivity)
{
$finder = $this->finder('XF:User')
->with('Profile', true)
->with('Activity')
->isValidUser()
->where($inSet)
->order('username', 'ASC')
->limit($limit);
}
if ($sortByLastActivity)
{
$finder = $this->finder('XF:User')
->with('Profile', true)
->with('Activity')
->isValidUser()
->where($inSet)
->order('last_activity', 'DESC')
->limit($limit);
}