3 * Table Definition for Core_person_settings
5 class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
7 class Pman_Core_DataObjects_Core_person_settings extends DB_DataObject
10 /* the code below is auto generated do not remove the above tag */
12 public $__table = 'core_person_settings';
18 /* the code above is auto generated do not remove the tag below */
21 function beforeInsert($q, $roo)
23 if(!$this->hasPermission($roo)) {
24 $roo->jerr('Access Dennied');
27 $o = $this->isExist();
40 function beforeUpdate($old, $q, $roo)
42 if(!$this->hasPermission($roo)) {
43 $roo->jerr('Access Dennied');
47 function beforeDelete($dependants_array, $roo)
49 if(!$this->hasPermission($roo)) {
50 $roo->jerr('Access Dennied');
54 function hasPermission($roo)
58 (!empty($this->person_id) && $this->person_id != $roo->authUser->id)
68 $core_person_settings = DB_DataObject::factory('core_person_settings');
69 $core_person_settings->setFrom(array(
70 'scope' => $this->scope,
71 'person_id' => $this->person_id
74 if($core_person_settings->find(true)) {
75 return $core_person_settings;