0dd1ac7ebcc027487266fa4a7dd166d2b0e66ffe
[Pman.Core] / DataObjects / Core_person_settings.php
1 <?php
2 /**
3  * Table Definition for Core_person_settings
4  */
5 class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
6
7 class Pman_Core_DataObjects_Core_person_settings extends DB_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'core_person_settings';
13     public $id;
14     public $person_id;
15     public $scope;
16     public $data;
17     
18     /* the code above is auto generated do not remove the tag below */
19     ###END_AUTOCODE
20     
21     function beforeInsert($q, $roo)
22     {
23         if(
24                 !$roo->authUser ||
25                 (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
26         ) {
27             $roo->jerr('Access Dennied');
28         }
29         
30     }
31     
32     function beforeUpdate($old, $q, $roo)
33     {
34         if(
35                 !$roo->authUser ||
36                 (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
37         ) {
38             $roo->jerr('Access Dennied');
39         }
40     }
41     
42  }