bPk kann per config für alle Benutzer abgefragt werden

This commit is contained in:
Nikolaus Krondraf
2020-08-20 09:16:55 +02:00
parent f2804fd2f6
commit 5349bf7e4b
2 changed files with 20 additions and 1 deletions
+3
View File
@@ -249,4 +249,7 @@ define('BIS_FUNKTIONSCODE_6_ARR', array(
'Team'
));
// bPk Abfrage
define('BPK_FUER_ALLE_BENUTZER_ABFRAGEN', false);
?>
+17 -1
View File
@@ -75,7 +75,22 @@ else
$webservice = new dvb(DVB_USERNAME, DVB_PASSWORD, $debug);
$qry = "
if (defined('BPK_FUER_ALLE_BENUTZER_ABFRAGEN') && BPK_FUER_ALLE_BENUTZER_ABFRAGEN)
{
$qry = "
SELECT
distinct person_id, vorname, nachname
FROM
public.tbl_person
JOIN public.tbl_benutzer USING(person_id)
WHERE
public.tbl_benutzer.aktiv = true
AND tbl_person.bpk is null
AND gebdatum is not null";
}
else
{
$qry = "
SELECT
distinct person_id, vorname, nachname
FROM
@@ -89,6 +104,7 @@ $qry = "
AND studiengang_kz<10000
AND EXISTS(SELECT 1 FROM public.tbl_prestudent WHERE person_id=tbl_person.person_id AND bismelden=true)
AND gebdatum is not null";
}
if ($limit != '')
$qry .= " LIMIT ".$limit;