mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
This commit is contained in:
@@ -4,6 +4,7 @@ class Person_model extends DB_Model
|
||||
public function __construct($uid=null)
|
||||
{
|
||||
parent::__construct($uid);
|
||||
$this->dbTable='public.tbl_person';
|
||||
}
|
||||
|
||||
public function getPerson($person_id = null)
|
||||
@@ -26,4 +27,21 @@ class Person_model extends DB_Model
|
||||
return $query->result_object();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt Personendaten eine BenutzerUID
|
||||
* @param string $uid DB-Attr: tbl_benutzer.uid .
|
||||
* @return bool
|
||||
*/
|
||||
public function getPersonFromBenutzerUID($uid)
|
||||
{
|
||||
|
||||
if (!$this->fhc_db_acl->bb->isBerechtigt('person','s'))
|
||||
{
|
||||
$this->db->select('tbl_person.*');
|
||||
$this->db->from('public.tbl_person JOIN public.tbl_benutzer USING (person_id)');
|
||||
$query = $this->db->get_where(null, array('uid' => $uid));
|
||||
return $query->result_object();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user