From 81befd4e8d92acef252928a2c2e76b7f3dfaac47 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Wed, 9 Oct 2013 13:16:14 +0000 Subject: [PATCH] =?UTF-8?q?checkZugangscodePerson=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/person.class.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/include/person.class.php b/include/person.class.php index 58b9b5992..1058c5a70 100644 --- a/include/person.class.php +++ b/include/person.class.php @@ -731,6 +731,37 @@ class person extends basis_db return false; } } + + /** + * + * Überprüft den übergebenen Zugangscode und retuniert die aktuelle incoming_id + * @param $zugangscode + */ + public function checkZugangscodePerson($zugangscode) + { + $qry =" + SELECT + person_id + FROM + public.tbl_person + WHERE + zugangscode=".$this->db_add_param($zugangscode).';'; + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + return $row->person_id; + } + else + return false; + } + else + { + $this->errormsg = 'Fehler bei einer Datenbankabfrage'; + return false; + } + } /** *