api endpoint returns actives parents by default
This commit is contained in:
@@ -27,9 +27,22 @@ if (!$allowKey || !$allowKey->isValidFor('api')) {
|
||||
die(json_encode(['success' => false]));
|
||||
}
|
||||
|
||||
$wkSqlQuery = 'SELECT * FROM `wettkampfkalender` WHERE `Datum` >= CURDATE();';
|
||||
$wkSqlQuery = "SELECT DISTINCT"
|
||||
." `wkParticipo_Users`.* "
|
||||
." FROM `wkParticipo_Users`"
|
||||
." JOIN `vormundschaft`"
|
||||
." ON `wkParticipo_Users`.`id` =`vormundschaft`.`userId`"
|
||||
." JOIN `wkParticipo_user<=>userAttributes`"
|
||||
." ON `wkParticipo_user<=>userAttributes`.`userId` = `vormundschaft`.`kidId`"
|
||||
." WHERE `wkParticipo_user<=>userAttributes`.`attributeId` = 4"
|
||||
." ORDER BY `wkParticipo_Users`.`id` ASC;";
|
||||
|
||||
$wkSqlResponse = dbConnector::query($wkSqlQuery);
|
||||
|
||||
foreach( $wkSqlResponse as &$user){
|
||||
$user['eMail'] = explode(",", $user['eMail']);
|
||||
}
|
||||
|
||||
header('Access-Control-Allow-Headers: *');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user