mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
Merge
This commit is contained in:
@@ -5,32 +5,22 @@ class Person_model extends DB_Model
|
||||
|
||||
public function __construct($uid = null)
|
||||
{
|
||||
parent::__construct($uid);
|
||||
$this->dbTable = 'public.tbl_person';
|
||||
parent::__construct($uid);
|
||||
$this->dbTable = 'public.tbl_person';
|
||||
}
|
||||
|
||||
public function getPerson($person_id = null)
|
||||
{
|
||||
if (is_null($person_id))
|
||||
{
|
||||
$query = $this->db->get_where('public.tbl_person', array());
|
||||
return $query->result_object();
|
||||
if (is_null($person_id))
|
||||
{
|
||||
$query = $this->db->get_where('public.tbl_person', array());
|
||||
return $query->result_object();
|
||||
}
|
||||
|
||||
$query = $this->db->get_where('public.tbl_person', array('person_id' => $person_id));
|
||||
return $query->row_object();
|
||||
}
|
||||
|
||||
$query = $this->db->get_where('public.tbl_person', array('person_id' => $person_id));
|
||||
return $query->row_object();
|
||||
}
|
||||
|
||||
public function getPersonByCode($code)
|
||||
{
|
||||
if ($this->fhc_db_acl->bb->isBerechtigt('person', 's'))
|
||||
{
|
||||
$query = $this->db->get_where('public.tbl_person', array('zugangscode' => $code));
|
||||
return $query->result_object();
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Laedt Personendaten einer Person mittels Code
|
||||
* @param string $code DB-Attr: tbl_benutzer.zugangscode .
|
||||
@@ -48,7 +38,8 @@ class Person_model extends DB_Model
|
||||
return $this->_general_error($this->fhc_db_acl->bb->errormsg);
|
||||
//return false;
|
||||
}
|
||||
=======
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt Personendaten eine BenutzerUID
|
||||
* @param string $uid DB-Attr: tbl_benutzer.uid .
|
||||
@@ -56,14 +47,13 @@ class Person_model extends DB_Model
|
||||
*/
|
||||
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();
|
||||
>>>>>>> 97ddc838a8c9e707d3bf5a6a700301252d2f5ed8
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public function savePerson($person)
|
||||
|
||||
Reference in New Issue
Block a user