DataObjects/Core_person_settings.php
[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     
33     function beforeUpdate($old, $q, $roo)
34     {
35         if(
36                 !$roo->authUser ||
37                 (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
38         ) {
39             $roo->jerr('Access Dennied');
40         }
41     }
42     
43     function beforeDelete($dependants_array, $roo)
44     {
45         if(
46                 !$roo->authUser ||
47                 (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
48         ) {
49             $roo->jerr('Access Dennied');
50         }
51     }
52     
53  }