|
@@ -90,11 +90,11 @@ if($submit) {
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// Gets testers near a project
|
|
// Gets testers near a project
|
|
|
case "get-testers": {
|
|
case "get-testers": {
|
|
|
|
|
|
|
|
$location_id = http::value("location_id", "int");
|
|
$location_id = http::value("location_id", "int");
|
|
|
|
|
+ $include_unverified = http::value("include_unverified", "int");
|
|
|
$location = Location::get($location_id);
|
|
$location = Location::get($location_id);
|
|
|
if(!$location) throw new Exception("Location not found.");
|
|
if(!$location) throw new Exception("Location not found.");
|
|
|
|
|
|
|
@@ -157,9 +157,10 @@ if($submit) {
|
|
|
$is_current_tester = $user->id == $test->tester_id;
|
|
$is_current_tester = $user->id == $test->tester_id;
|
|
|
$is_deactivated = $user->level == User::LEVEL_DEACTIVATED;
|
|
$is_deactivated = $user->level == User::LEVEL_DEACTIVATED;
|
|
|
$is_registered = $user->level == User::LEVEL_REGISTERED;
|
|
$is_registered = $user->level == User::LEVEL_REGISTERED;
|
|
|
- $is_unverified = $user->level == User::LEVEL_UNVERIFIED;
|
|
|
|
|
|
|
+ $is_unverified = $user->level <= User::LEVEL_UNVERIFIED;
|
|
|
|
|
|
|
|
if($is_deactivated) continue;
|
|
if($is_deactivated) continue;
|
|
|
|
|
+ if(!$include_unverified && $is_unverified) continue;
|
|
|
|
|
|
|
|
$distance_miles = Geolocation::getDistance($location->getGeolocation(), $address->getGeolocation());
|
|
$distance_miles = Geolocation::getDistance($location->getGeolocation(), $address->getGeolocation());
|
|
|
$distance_kilometers = $distance_miles * Geolocation::KMS_IN_MILE;
|
|
$distance_kilometers = $distance_miles * Geolocation::KMS_IN_MILE;
|