diff --git a/config/vilesci.config-default.inc.php b/config/vilesci.config-default.inc.php index 1647cb59a..9654ce79a 100644 --- a/config/vilesci.config-default.inc.php +++ b/config/vilesci.config-default.inc.php @@ -249,4 +249,7 @@ define('BIS_FUNKTIONSCODE_6_ARR', array( 'Team' )); +// bPk Abfrage +define('BPK_FUER_ALLE_BENUTZER_ABFRAGEN', false); + ?> diff --git a/vilesci/cronjobs/bpk.php b/vilesci/cronjobs/bpk.php index 2d26634e3..3a7ac4395 100644 --- a/vilesci/cronjobs/bpk.php +++ b/vilesci/cronjobs/bpk.php @@ -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;