Files
FHC-Core/application/models/person/Person_model.php
T
Paminger d28f79e855 FHC ACL
2016-03-14 07:10:51 +01:00

30 lines
735 B
PHP

<?php
class Person_model extends DB_Model
{
public function __construct($uid=null)
{
parent::__construct($uid);
}
public function getPersonen($person_id = FALSE)
{
if ($person_id === FALSE)
{
$query = $this->db->get_where('public.tbl_person', array('vorname' => 'Christian'));
return $query->result_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();
}
}
}