mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-02 03:19:27 +00:00
30 lines
735 B
PHP
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();
|
|
}
|
|
}
|
|
}
|