Files
FHC-Core/application/models/person/Benutzerfunktion_model.php
T
Paolo 45b4c84764 Task #1355:
- If the sender of a message is an admin: show all the vorlage with
mimetype = text/html
 - If the sender of a message is NOT an admin: show all the
vorlage that belongs to the organisation units of the user
and the parents of those organisation units until the root
of the organisation unit tree

Changes:
 - Added method isAdminByPersonId to model Benutzerrolle_model
 - Added method _getAllHTMLVorlage to Vorlage_widget
 - Added method _getUserVorlage to Vorlage_widget
2017-06-06 15:21:22 +02:00

25 lines
479 B
PHP

<?php
class Benutzerfunktion_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_benutzerfunktion';
$this->pk = 'benutzerfunktion_id';
}
/**
* Get the Benutzerfunktion using the person_id
*/
public function getByPersonId($person_id)
{
// Join with the table
$this->addJoin('public.tbl_benutzer', 'uid');
return $this->loadWhere(array('person_id' => $person_id));
}
}