Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class user extends user_ext

Hide Inherited MembersHelix Core
Description
No description.
 
Constants
constantTABLENAME ["cor_user"][ user ]
 
Properties
protected_authmethod_id[ user_db ]
protected_authmethod_id_dirty[ user_db ]
protected_cdate[ user_db ]
protected_cdate_dirty[ user_db ]
protected_deleted[ user_db ]
protected_deleted_dirty[ user_db ]
protected_description[ entity_db ]
protected_description_dirty[ entity_db ]
protected_dirty[ obj ]
protected_entity_id[ person_db ]
protected_entity_id_dirty[ person_db ]
protected_entity_type_id[ entity_db ]
protected_entity_type_id_dirty[ entity_db ]
protected_first_name[ person_db ]
protected_first_name_dirty[ person_db ]
protected__id[ user_db ]
protected_id[ entity_db ]
protected__id_dirty[ user_db ]
protected_id_dirty[ entity_db ]
protected_inactive[ user_db ]
protected_inactive_dirty[ user_db ]
protected_initials[ person_db ]
protected_initials_dirty[ person_db ]
protected_last_name[ person_db ]
protected_last_name_dirty[ person_db ]
protected_mdate[ user_db ]
protected_mdate_dirty[ user_db ]
protected_middle_name[ person_db ]
protected_middle_name_dirty[ person_db ]
protected_nickname[ person_db ]
protected_nickname_dirty[ person_db ]
protected_password[ user_db ]
protected_password_dirty[ user_db ]
protected_person_entity_id[ user_db ]
protected_person_entity_id_dirty[ user_db ]
protected_person_type_id[ person_db ]
protected_person_type_id_dirty[ person_db ]
publicpreferences[ user_ext ]
publicproperty_objects_array[ obj ]
protected_suffix[ person_db ]
protected_suffix_dirty[ person_db ]
protected_user_type_id[ user_db ]
protected_user_type_id_dirty[ user_db ]
protected_username[ user_db ]
protected_username_dirty[ user_db ]
protected_userstatus_id[ user_db ]
protected_userstatus_id_dirty[ user_db ]
 
Methods
publiccheck_perms ( perms , match_all [false] )[ user_ext ]
Parameters
requiredperms
optionalmatch_all [false]
Code
285  public function check_perms($__perms, $__match_all=false)
286  {
287      if ($this->is_admin)
288      {
289          return true;
290      }
291 
292      $perms = is_array($__perms) ? $__perms : explode(",",$__perms);
293      $none = new perm(null,"none");
294      if (in_array($none->name,$perms) || in_array($none->id,$perms))
295      {
296          return true;
297      }
298 
299      $user_perm_ids = $this->perms;
300      $check_perm_ids = array();
301      foreach ($perms as $perm)
302      {
303          if (is_numeric($perm))
304          {
305              $check_perm_ids[] = $perm;
306          }
307          else if ($perm!=$none->name)
308          {
309              $p = new perm(null,$perm);
310              $check_perm_ids[] = $p->id;
311          }
312      }
313      $check_perm_ids = array_unique($check_perm_ids);
314      $auth = $__match_all ? count(array_diff($check_perm_ids,$user_perm_ids))==0 : count(array_intersect($check_perm_ids,$user_perm_ids))>0;
315 
316      return $auth;
317  }
publiccheck_rel ( object , types )[ user_ext ]
Parameters
requiredobject
optionaltypes
Code
319  public function check_rel($__object, $__types=null)
320  {
321      if ($this->is_admin)
322      {
323          return true;
324      }
325 
326      $auth = false;
327      $class = get_class(($__object));
328      $property_ids = substr($class,strpos($class,"_")+1) . "_ids";
329      $types = is_null($__types) ? array() : (is_array($__types) ? $__types : array($__types));
330      if (count($types) > 0)
331      {
332          foreach ($types as $type)
333          {
334              $auth = $auth || in_array($__object->id,$this->{"{$type}_{$property_ids}"});
335          }
336      }
337      else
338      {
339          $auth = in_array($__object->id,$this->{$property_ids});
340      }
341      return $auth;
342  }
publiccheck_roles ( roles , match_all [false] )[ user_ext ]
Parameters
requiredroles
optionalmatch_all [false]
Code
262  public function check_roles($__roles, $__match_all=false)
263  {
264      $roles = is_array($__roles) ? $__roles : explode(",",$__roles);
265      $user_role_ids = $this->roles;
266      $check_role_ids = array();
267      foreach ($roles as $role)
268      {
269          if (is_numeric($role))
270          {
271              $check_role_ids[] = $role;
272          }
273          else
274          {
275              $r = new role(null,$role);
276              $check_role_ids[] = $r->id;
277          }
278      }
279      $check_role_ids = array_unique($check_role_ids);
280      $auth = $__match_all ? count(array_diff($check_role_ids,$user_role_ids))==0 : count(array_intersect($check_role_ids,$user_role_ids))>0;
281 
282      return $auth;
283  }
publiccommit ( )[ user_ext ]
Parameters
No parameters for this method
Code
012  public function commit()
013  {
014      parent::commit();
015      $this->update_preferences();
016  }
public__construct ( person_entity_id , username )[ user_ext ]
Parameters
optionalperson_entity_id
optionalusername
Code
006  public function __construct($__person_entity_id=null, $__username=null)
007  {
008      parent::__construct($__person_entity_id,$__username);
009      $this->load_preferences();
010  }
protected staticdb ( )[ user_db ]
Parameters
No parameters for this method
Code
1469  protected static function db()
1470  {
1471      return new db();
1472  }
publicdelete ( )[ user_db ]
Parameters
No parameters for this method
Code
233  public function delete()
234  {
235      parent::delete();
236      $db = user::db();
237      $q  = " UPDATE cor_user SET ";
238      $q .= " deleted = 1 ";
239      $q .= " WHERE person_entity_id = " . $this->_person_entity_id;
240      $db->query($q);
241      $this->deleted = true;
242      return true;
243  }
public staticdelete_all ( )[ user_db ]
Parameters
No parameters for this method
Code
349  public static function delete_all()
350  {
351      $db = user::db();
352      $q  = " UPDATE cor_user SET ";
353      $q .= " deleted = 1 ";
354     
355      $db->query($q);
356      return true;
357  }
publicemulate ( )[ user_ext ]
Parameters
No parameters for this method
Code
172  public function emulate()
173  {
174      global $sess,$page,$module;
175 
176      //get the current user out of the session
177      $session_user = new session_user(null,$sess->id,$sess->user->id);
178 
179      if($this->id!=0)
180      {
181          $session_user->user_id = $this->id;
182          $session_user->commit();
183          $sess->commit();
184          header("Location: " . $sess->url(WEBROOT,false));
185 
186      }
187  }
public__get ( p )[ obj ]
Parameters
requiredp
Code
007  public function __get($p)
008  {
009      $methods = get_class_methods($this);
010      $properties = get_object_vars($this);
011      if (in_array("get_$p",$methods))
012      {
013          return $this->{"get_$p"}();
014      }
015      else if (array_key_exists("_$p",$properties))
016      {
017          return $this->{"_$p"};
018      }
019      else if (in_array("get_" . substr($p,strpos($p,"_")+1), $methods))
020      {
021          return $this->{"get_" . substr($p,strpos($p,"_")+1)}(substr($p,0,strpos($p,"_")));
022      }
023      else
024      {
025          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
026          return null;
027      }
028  }
publicget_address ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
938  public function get_address($__type="default")
939  {
940      $object = is_null(keyval($this->property_objects_array,"{$__type}_address")) ? new address($this->get_address_id($__type)) : $this->property_objects_array["{$__type}_address"];
941      $this->property_objects_array["{$__type}_address"] = $object;
942      return $object;
943  }
publicget_address_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
944  public function get_address_id($__type="default")
945  {
946      $ids = $this->get_address_ids($__type, true);
947      return (count($ids)==1 ? $ids[0] : null);
948  }
publicget_address_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
949  public function get_address_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
950  {
951      $address_ids = array();
952      $db = entity::db();
953      $q  = " SELECT cor_address.id FROM cor_address_entity INNER JOIN cor_address ON cor_address_entity.address_id=cor_address.id AND cor_address_entity.deleted=0 AND cor_address.deleted=0 AND cor_address_entity.entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_address_entity.address_entity_type_id='" . address_entity::type_id($__type) . "'") . ($__get_primary ? " AND cor_address_entity.primary=1 " : "");
954      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
955      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
956      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
957      $db->query($q);
958      while ($db->next_record())
959      {
960          $address_ids[] = $db->f("id");
961      }
962      return $address_ids;
963  }
publicget_address_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
964  public function get_address_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
965  {
966      $ids = $this->get_address_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
967      $objects = array();
968      foreach ($ids as $index=>$id)
969      {
970          $objects[$index] = new address($id);
971      }
972      return $objects;
973  }
publicget_array ( )[ obj ]
Parameters
No parameters for this method
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicget_asset ( type ["default"] )[ person_db ]
Parameters
optionaltype ["default"]
Code
426  public function get_asset($__type="default")
427  {
428      $object = is_null(keyval($this->property_objects_array,"{$__type}_asset")) ? new asset($this->get_asset_id($__type)) : $this->property_objects_array["{$__type}_asset"];
429      $this->property_objects_array["{$__type}_asset"] = $object;
430      return $object;
431  }
publicget_asset_id ( type ["default"] )[ person_db ]
Parameters
optionaltype ["default"]
Code
432  public function get_asset_id($__type="default")
433  {
434      $ids = $this->get_asset_ids($__type, true);
435      return (count($ids)==1 ? $ids[0] : null);
436  }
publicget_asset_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ person_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
437  public function get_asset_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
438  {
439      $asset_ids = array();
440      $db = person::db();
441      $q  = " SELECT am_asset.id FROM am_asset_person INNER JOIN am_asset ON am_asset_person.asset_id=am_asset.id AND am_asset_person.deleted=0 AND am_asset.deleted=0 AND am_asset_person.person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND am_asset_person.asset_person_type_id='" . asset_person::type_id($__type) . "'") . ($__get_primary ? " AND am_asset_person.primary=1 " : "");
442      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
443      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
444      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
445      $db->query($q);
446      while ($db->next_record())
447      {
448          $asset_ids[] = $db->f("id");
449      }
450      return $asset_ids;
451  }
publicget_asset_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ person_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
452  public function get_asset_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
453  {
454      $ids = $this->get_asset_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
455      $objects = array();
456      foreach ($ids as $index=>$id)
457      {
458          $objects[$index] = new asset($id);
459      }
460      return $objects;
461  }
publicget_authmethod ( )[ user_db ]
Parameters
No parameters for this method
Code
455  public function get_authmethod()
456  {
457      return new authmethod($this->authmethod_id);
458  }
public staticget_by_last_name ( starts_with , order_by )[ person_ext ]
Parameters
optionalstarts_with
optionalorder_by
Code
032  public static function get_by_last_name($__starts_with=null, $__order_by=null)
033  {
034      $db = new db;
035      $ids = array();
036      $q  = " SELECT entity_id ";
037      $q .= " FROM " . self::TABLENAME . " ";
038      $q .= " WHERE deleted = 0 ";
039      $q .= " AND last_name LIKE '$__starts_with%' ";
040      $q .= " ORDER BY last_name, first_name ";
041     
042      $db->query($q);
043     
044      while ($db->next_record())
045      {
046          $ids[] = $db->f("entity_id");
047      }
048     
049      return $ids;   
050  }
publicget_classname ( )[ obj ]
Parameters
No parameters for this method
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
public staticget_columns ( columns , order , lookups , where_clause , limit , offset [0] )[ user_db ]
Parameters
requiredcolumns
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
267  public static function get_columns($__columns, $__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
268  {
269      $lookups = is_array($__lookups) ? $__lookups : array($__lookups);
270      $colarray = is_array($__columns) ? $__columns : explode(",",$__columns);
271      $colstring = is_array($__columns) ? implode(",",$__columns) : $__columns;
272 
273      $db = user::db();
274      $data = array();
275      $q  = " SELECT $colstring ";
276      $q .= " FROM cor_user ";
277      $q .= " INNER JOIN cor_person ON cor_user.person_entity_id=cor_person.entity_id ";
278      $q .= array_key_exists("person_type_id",$lookups) ? " AND cor_person.person_type_id='" . $lookups["person_type_id"] . "' " : "";
279      $q .= " INNER JOIN cor_entity ON cor_person.entity_id=cor_entity.id ";
280      $q .= array_key_exists("entity_type_id",$lookups) ? " AND cor_entity.entity_type_id='" . $lookups["entity_type_id"] . "' " : "";
281      $q .= " WHERE cor_user.deleted = 0 ";
282      $q .= is_null($__where_clause) ? null : " AND ($__where_clause) ";
283      $q .= array_key_exists("user_type_id",$lookups) ? " AND cor_user.user_type_id='" . $lookups["user_type_id"] . "' " : "";
284      $q .= array_key_exists("authmethod_id",$lookups) ? " AND cor_user.authmethod_id='" . $lookups["authmethod_id"] . "' " : "";
285      $q .= array_key_exists("userstatus_id",$lookups) ? " AND cor_user.userstatus_id='" . $lookups["userstatus_id"] . "' " : "";
286 
287      if (is_string($__order))
288      {
289          $q .= "ORDER BY " . $__order;
290      }
291      else if (is_array($__order) and count($__order)>0)
292      {
293          $orderings = array();
294          foreach ($__order as $col=>$dir)
295          {
296              $orderings[] = " $col $dir ";
297          }
298          $q .= "ORDER BY " . implode(", ", $orderings);
299      }
300      else if (is_object($__order))
301      {
302          $q .= "";
303      }
304      else
305      {
306          // THERE IS NO `order` COLUMN ON THIS OBJECT
307      }
308 
309      if (!is_null($__limit))
310      {
311          $q .= " LIMIT $__offset , $__limit ";
312      }
313 
314      $db->query($q);
315 
316      if (count($colarray)>1 || $colstring=="*")
317      {
318          while ($db->next_record())
319          {
320              $data[] = $db->record;
321          }
322      }
323      else
324      {
325          while ($db->next_record())
326          {
327              $data[] = $db->f(0);
328          }
329      }
330 
331      return $data;
332  }
publicget_comment ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
974  public function get_comment($__type="default")
975  {
976      $object = is_null(keyval($this->property_objects_array,"{$__type}_comment")) ? new comment($this->get_comment_id($__type)) : $this->property_objects_array["{$__type}_comment"];
977      $this->property_objects_array["{$__type}_comment"] = $object;
978      return $object;
979  }
publicget_comment_id ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
980  public function get_comment_id($__type="default")
981  {
982      $ids = $this->get_comment_ids($__type, true);
983      return (count($ids)==1 ? $ids[0] : null);
984  }
publicget_comment_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
985  public function get_comment_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
986  {
987      $comment_ids = array();
988      $db = user::db();
989      $q  = " SELECT cor_comment.id FROM cor_comment_user INNER JOIN cor_comment ON cor_comment_user.comment_id=cor_comment.id AND cor_comment_user.deleted=0 AND cor_comment.deleted=0 AND cor_comment_user.user_person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_comment_user.comment_user_type_id='" . comment_user::type_id($__type) . "'") . ($__get_primary ? " AND cor_comment_user.primary=1 " : "");
990      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
991      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
992      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
993      $db->query($q);
994      while ($db->next_record())
995      {
996          $comment_ids[] = $db->f("id");
997      }
998      return $comment_ids;
999  }
publicget_comment_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1000  public function get_comment_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1001  {
1002      $ids = $this->get_comment_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
1003      $objects = array();
1004      foreach ($ids as $index=>$id)
1005      {
1006          $objects[$index] = new comment($id);
1007      }
1008      return $objects;
1009  }
publicget_content ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
479  public function get_content($__type="default")
480  {
481      $object = is_null(keyval($this->property_objects_array,"{$__type}_content")) ? new content($this->get_content_id($__type)) : $this->property_objects_array["{$__type}_content"];
482      $this->property_objects_array["{$__type}_content"] = $object;
483      return $object;
484  }
publicget_content_id ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
485  public function get_content_id($__type="default")
486  {
487      $ids = $this->get_content_ids($__type, true);
488      return (count($ids)==1 ? $ids[0] : null);
489  }
publicget_content_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
490  public function get_content_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
491  {
492      $content_ids = array();
493      $db = user::db();
494      $q  = " SELECT cms_content.id FROM cms_content_user INNER JOIN cms_content ON cms_content_user.content_id=cms_content.id AND cms_content_user.deleted=0 AND cms_content.deleted=0 AND cms_content_user.user_person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND cms_content_user.content_user_type_id='" . content_user::type_id($__type) . "'") . ($__get_primary ? " AND cms_content_user.primary=1 " : "");
495      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
496      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
497      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
498      $db->query($q);
499      while ($db->next_record())
500      {
501          $content_ids[] = $db->f("id");
502      }
503      return $content_ids;
504  }
publicget_content_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
505  public function get_content_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
506  {
507      $ids = $this->get_content_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
508      $objects = array();
509      foreach ($ids as $index=>$id)
510      {
511          $objects[$index] = new content($id);
512      }
513      return $objects;
514  }
publicget_dirty ( )[ obj ]
Parameters
No parameters for this method
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicget_document ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1433  public function get_document($__type="default")
1434  {
1435      $object = is_null(keyval($this->property_objects_array,"{$__type}_document")) ? new document($this->get_document_id($__type)) : $this->property_objects_array["{$__type}_document"];
1436      $this->property_objects_array["{$__type}_document"] = $object;
1437      return $object;
1438  }
publicget_document_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1439  public function get_document_id($__type="default")
1440  {
1441      $ids = $this->get_document_ids($__type, true);
1442      return (count($ids)==1 ? $ids[0] : null);
1443  }
publicget_document_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1444  public function get_document_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1445  {
1446      $document_ids = array();
1447      $db = entity::db();
1448      $q  = " SELECT doc_document.id FROM doc_document_entity INNER JOIN doc_document ON doc_document_entity.document_id=doc_document.id AND doc_document_entity.deleted=0 AND doc_document.deleted=0 AND doc_document_entity.entity_id='$this->id' " . (is_null($__type) ? "" : " AND doc_document_entity.document_entity_type_id='" . document_entity::type_id($__type) . "'") . ($__get_primary ? " AND doc_document_entity.primary=1 " : "");
1449      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
1450      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
1451      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
1452      $db->query($q);
1453      while ($db->next_record())
1454      {
1455          $document_ids[] = $db->f("id");
1456      }
1457      return $document_ids;
1458  }
publicget_document_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1459  public function get_document_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1460  {
1461      $ids = $this->get_document_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
1462      $objects = array();
1463      foreach ($ids as $index=>$id)
1464      {
1465          $objects[$index] = new document($id);
1466      }
1467      return $objects;
1468  }
publicget_email ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1037  public function get_email($__type="default")
1038  {
1039      $object = is_null(keyval($this->property_objects_array,"{$__type}_email")) ? new email($this->get_email_id($__type)) : $this->property_objects_array["{$__type}_email"];
1040      $this->property_objects_array["{$__type}_email"] = $object;
1041      return $object;
1042  }
publicget_email_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1043  public function get_email_id($__type="default")
1044  {
1045      $ids = $this->get_email_ids($__type, true);
1046      return (count($ids)==1 ? $ids[0] : null);
1047  }
publicget_email_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1048  public function get_email_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1049  {
1050      $email_ids = array();
1051      $db = entity::db();
1052      $q  = " SELECT cor_email.id FROM cor_email_entity INNER JOIN cor_email ON cor_email_entity.email_id=cor_email.id AND cor_email_entity.deleted=0 AND cor_email.deleted=0 AND cor_email_entity.entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_email_entity.email_entity_type_id='" . email_entity::type_id($__type) . "'") . ($__get_primary ? " AND cor_email_entity.primary=1 " : "");
1053      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
1054      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
1055      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
1056      $db->query($q);
1057      while ($db->next_record())
1058      {
1059          $email_ids[] = $db->f("id");
1060      }
1061      return $email_ids;
1062  }
publicget_email_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1063  public function get_email_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1064  {
1065      $ids = $this->get_email_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
1066      $objects = array();
1067      foreach ($ids as $index=>$id)
1068      {
1069          $objects[$index] = new email($id);
1070      }
1071      return $objects;
1072  }
publicget_employee ( )[ user_ext ]
Parameters
No parameters for this method
Code
083  public function get_employee()
084  {
085      return new employee($this->id);
086  }
publicget_entity ( )[ person_db ]
Parameters
No parameters for this method
Code
402  public function get_entity()
403  {
404      return new entity($this->entity_id);
405  }
publicget_entity_type ( )[ entity_db ]
Parameters
No parameters for this method
Code
332  public function get_entity_type()
333  {
334      return new entity_type($this->entity_type_id);
335  }
publicget_event ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
542  public function get_event($__type="default")
543  {
544      $object = is_null(keyval($this->property_objects_array,"{$__type}_event")) ? new event($this->get_event_id($__type)) : $this->property_objects_array["{$__type}_event"];
545      $this->property_objects_array["{$__type}_event"] = $object;
546      return $object;
547  }
publicget_event_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
548  public function get_event_id($__type="default")
549  {
550      $ids = $this->get_event_ids($__type, true);
551      return (count($ids)==1 ? $ids[0] : null);
552  }
publicget_event_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
553  public function get_event_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
554  {
555      $event_ids = array();
556      $db = entity::db();
557      $q  = " SELECT cal_event.id FROM cal_entity_event INNER JOIN cal_event ON cal_entity_event.event_id=cal_event.id AND cal_entity_event.deleted=0 AND cal_event.deleted=0 AND cal_entity_event.entity_id='$this->id' " . (is_null($__type) ? "" : " AND cal_entity_event.entity_event_type_id='" . entity_event::type_id($__type) . "'") . ($__get_primary ? " AND cal_entity_event.primary=1 " : "");
558      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
559      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
560      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
561      $db->query($q);
562      while ($db->next_record())
563      {
564          $event_ids[] = $db->f("id");
565      }
566      return $event_ids;
567  }
publicget_event_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
568  public function get_event_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
569  {
570      $ids = $this->get_event_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
571      $objects = array();
572      foreach ($ids as $index=>$id)
573      {
574          $objects[$index] = new event($id);
575      }
576      return $objects;
577  }
publicget_group ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
578  public function get_group($__type="default")
579  {
580      $object = is_null(keyval($this->property_objects_array,"{$__type}_group")) ? new group($this->get_group_id($__type)) : $this->property_objects_array["{$__type}_group"];
581      $this->property_objects_array["{$__type}_group"] = $object;
582      return $object;
583  }
publicget_group_id ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
584  public function get_group_id($__type="default")
585  {
586      $ids = $this->get_group_ids($__type, true);
587      return (count($ids)==1 ? $ids[0] : null);
588  }
publicget_group_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
589  public function get_group_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
590  {
591      $group_ids = array();
592      $db = user::db();
593      $q  = " SELECT cor_group.id FROM cor_group_user INNER JOIN cor_group ON cor_group_user.group_id=cor_group.id AND cor_group_user.deleted=0 AND cor_group.deleted=0 AND cor_group_user.user_person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_group_user.group_user_type_id='" . group_user::type_id($__type) . "'") . ($__get_primary ? " AND cor_group_user.primary=1 " : "");
594      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
595      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
596      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
597      $db->query($q);
598      while ($db->next_record())
599      {
600          $group_ids[] = $db->f("id");
601      }
602      return $group_ids;
603  }
publicget_group_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
604  public function get_group_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
605  {
606      $ids = $this->get_group_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
607      $objects = array();
608      foreach ($ids as $index=>$id)
609      {
610          $objects[$index] = new group($id);
611      }
612      return $objects;
613  }
public staticget_ids ( order , lookups , where_clause , limit , offset [0] )[ user_db ]
Parameters
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
334  public static function get_ids($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
335  {
336      return user::get_columns("person_entity_id", $__order, $__lookups, $__where_clause, $__limit, $__offset);
337  }
publicget_is_admin ( )[ user_ext ]
Parameters
No parameters for this method
Code
256  public function get_is_admin()
257  {
258      $admin = new perm(null,"admin");
259      return in_array($admin->id,$this->perms);
260  }
publicget_json ( )[ obj ]
Parameters
No parameters for this method
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicget_logged_in ( )[ user_ext ]
Parameters
No parameters for this method
Code
088  public function get_logged_in()
089  {
090      return ($this->id > 0);
091  }
publicget_menu ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1532  public function get_menu($__type="default")
1533  {
1534      $object = is_null(keyval($this->property_objects_array,"{$__type}_menu")) ? new menu($this->get_menu_id($__type)) : $this->property_objects_array["{$__type}_menu"];
1535      $this->property_objects_array["{$__type}_menu"] = $object;
1536      return $object;
1537  }
publicget_menu_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1538  public function get_menu_id($__type="default")
1539  {
1540      $ids = $this->get_menu_ids($__type, true);
1541      return (count($ids)==1 ? $ids[0] : null);
1542  }
publicget_menu_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1543  public function get_menu_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1544  {
1545      $menu_ids = array();
1546      $db = entity::db();
1547      $q  = " SELECT ifc_menu.id FROM ifc_entity_menu INNER JOIN ifc_menu ON ifc_entity_menu.menu_id=ifc_menu.id AND ifc_entity_menu.deleted=0 AND ifc_menu.deleted=0 AND ifc_entity_menu.entity_id='$this->id' " . (is_null($__type) ? "" : " AND ifc_entity_menu.entity_menu_type_id='" . entity_menu::type_id($__type) . "'") . ($__get_primary ? " AND ifc_entity_menu.primary=1 " : "");
1548      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
1549      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
1550      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
1551      $db->query($q);
1552      while ($db->next_record())
1553      {
1554          $menu_ids[] = $db->f("id");
1555      }
1556      return $menu_ids;
1557  }
publicget_menu_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1558  public function get_menu_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1559  {
1560      $ids = $this->get_menu_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
1561      $objects = array();
1562      foreach ($ids as $index=>$id)
1563      {
1564          $objects[$index] = new menu($id);
1565      }
1566      return $objects;
1567  }
publicget_name ( )[ person_ext ]
Parameters
No parameters for this method
Code
008  public function get_name()
009  {
010      if (is_null($this->_first_name) && is_null($this->_last_name))
011      {
012          return null;
013      }
014      else
015      {
016          return $this->_first_name . " " . $this->_last_name;
017      }
018  }
public staticget_objects ( order , lookups , where_clause , limit , offset [0] )[ user_db ]
Parameters
optionalorder
optionallookups
optionalwhere_clause
optionallimit
optionaloffset [0]
Code
339  public static function get_objects($__order=null, $__lookups=null, $__where_clause=null, $__limit=null, $__offset=0)
340  {
341      $objects = array();
342      foreach (user::get_columns("person_entity_id", $__order, $__lookups, $__where_clause, $__limit, $__offset) as $id)
343      {
344          $objects[] = new user($id);
345      }
346      return $objects;
347  }
publicget_order ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
641  public function get_order($__type="default")
642  {
643      $object = is_null(keyval($this->property_objects_array,"{$__type}_order")) ? new order($this->get_order_id($__type)) : $this->property_objects_array["{$__type}_order"];
644      $this->property_objects_array["{$__type}_order"] = $object;
645      return $object;
646  }
publicget_order_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
647  public function get_order_id($__type="default")
648  {
649      $ids = $this->get_order_ids($__type, true);
650      return (count($ids)==1 ? $ids[0] : null);
651  }
publicget_order_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
652  public function get_order_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
653  {
654      $order_ids = array();
655      $db = entity::db();
656      $q  = " SELECT com_order.id FROM com_entity_order INNER JOIN com_order ON com_entity_order.order_id=com_order.id AND com_entity_order.deleted=0 AND com_order.deleted=0 AND com_entity_order.entity_id='$this->id' " . (is_null($__type) ? "" : " AND com_entity_order.entity_order_type_id='" . entity_order::type_id($__type) . "'") . ($__get_primary ? " AND com_entity_order.primary=1 " : "");
657      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
658      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
659      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
660      $db->query($q);
661      while ($db->next_record())
662      {
663          $order_ids[] = $db->f("id");
664      }
665      return $order_ids;
666  }
publicget_order_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
667  public function get_order_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
668  {
669      $ids = $this->get_order_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
670      $objects = array();
671      foreach ($ids as $index=>$id)
672      {
673          $objects[$index] = new order($id);
674      }
675      return $objects;
676  }
publicget_orders ( )[ entity_ext ]
Parameters
No parameters for this method
Code
008  public function get_orders()
009  {
010      return $this->order_list;
011  }
publicget_orgchart ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
443  public function get_orgchart($__type="default")
444  {
445      $object = is_null(keyval($this->property_objects_array,"{$__type}_orgchart")) ? new orgchart($this->get_orgchart_id($__type)) : $this->property_objects_array["{$__type}_orgchart"];
446      $this->property_objects_array["{$__type}_orgchart"] = $object;
447      return $object;
448  }
publicget_orgchart_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
449  public function get_orgchart_id($__type="default")
450  {
451      $ids = $this->get_orgchart_ids($__type, true);
452      return (count($ids)==1 ? $ids[0] : null);
453  }
publicget_orgchart_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
454  public function get_orgchart_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
455  {
456      $orgchart_ids = array();
457      $db = entity::db();
458      $q  = " SELECT bus_orgchart.id FROM bus_entity_orgchart INNER JOIN bus_orgchart ON bus_entity_orgchart.orgchart_id=bus_orgchart.id AND bus_entity_orgchart.deleted=0 AND bus_orgchart.deleted=0 AND bus_entity_orgchart.entity_id='$this->id' " . (is_null($__type) ? "" : " AND bus_entity_orgchart.entity_orgchart_type_id='" . entity_orgchart::type_id($__type) . "'") . ($__get_primary ? " AND bus_entity_orgchart.primary=1 " : "");
459      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
460      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
461      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
462      $db->query($q);
463      while ($db->next_record())
464      {
465          $orgchart_ids[] = $db->f("id");
466      }
467      return $orgchart_ids;
468  }
publicget_orgchart_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
469  public function get_orgchart_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
470  {
471      $ids = $this->get_orgchart_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
472      $objects = array();
473      foreach ($ids as $index=>$id)
474      {
475          $objects[$index] = new orgchart($id);
476      }
477      return $objects;
478  }
publicget_orgposition ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
344  public function get_orgposition($__type="default")
345  {
346      $object = is_null(keyval($this->property_objects_array,"{$__type}_orgposition")) ? new orgposition($this->get_orgposition_id($__type)) : $this->property_objects_array["{$__type}_orgposition"];
347      $this->property_objects_array["{$__type}_orgposition"] = $object;
348      return $object;
349  }
publicget_orgposition_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
350  public function get_orgposition_id($__type="default")
351  {
352      $ids = $this->get_orgposition_ids($__type, true);
353      return (count($ids)==1 ? $ids[0] : null);
354  }
publicget_orgposition_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
355  public function get_orgposition_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
356  {
357      $orgposition_ids = array();
358      $db = entity::db();
359      $q  = " SELECT bus_orgposition.id FROM bus_entity_orgposition INNER JOIN bus_orgposition ON bus_entity_orgposition.orgposition_id=bus_orgposition.id AND bus_entity_orgposition.deleted=0 AND bus_orgposition.deleted=0 AND bus_entity_orgposition.entity_id='$this->id' " . (is_null($__type) ? "" : " AND bus_entity_orgposition.entity_orgposition_type_id='" . entity_orgposition::type_id($__type) . "'") . ($__get_primary ? " AND bus_entity_orgposition.primary=1 " : "");
360      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
361      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
362      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
363      $db->query($q);
364      while ($db->next_record())
365      {
366          $orgposition_ids[] = $db->f("id");
367      }
368      return $orgposition_ids;
369  }
publicget_orgposition_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
370  public function get_orgposition_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
371  {
372      $ids = $this->get_orgposition_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
373      $objects = array();
374      foreach ($ids as $index=>$id)
375      {
376          $objects[$index] = new orgposition($id);
377      }
378      return $objects;
379  }
publicget_payment ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
740  public function get_payment($__type="default")
741  {
742      $object = is_null(keyval($this->property_objects_array,"{$__type}_payment")) ? new payment($this->get_payment_id($__type)) : $this->property_objects_array["{$__type}_payment"];
743      $this->property_objects_array["{$__type}_payment"] = $object;
744      return $object;
745  }
publicget_payment_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
746  public function get_payment_id($__type="default")
747  {
748      $ids = $this->get_payment_ids($__type, true);
749      return (count($ids)==1 ? $ids[0] : null);
750  }
publicget_payment_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
751  public function get_payment_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
752  {
753      $payment_ids = array();
754      $db = entity::db();
755      $q  = " SELECT com_payment.id FROM com_entity_payment INNER JOIN com_payment ON com_entity_payment.payment_id=com_payment.id AND com_entity_payment.deleted=0 AND com_payment.deleted=0 AND com_entity_payment.entity_id='$this->id' " . (is_null($__type) ? "" : " AND com_entity_payment.entity_payment_type_id='" . entity_payment::type_id($__type) . "'") . ($__get_primary ? " AND com_entity_payment.primary=1 " : "");
756      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
757      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
758      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
759      $db->query($q);
760      while ($db->next_record())
761      {
762          $payment_ids[] = $db->f("id");
763      }
764      return $payment_ids;
765  }
publicget_payment_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
766  public function get_payment_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
767  {
768      $ids = $this->get_payment_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
769      $objects = array();
770      foreach ($ids as $index=>$id)
771      {
772          $objects[$index] = new payment($id);
773      }
774      return $objects;
775  }
publicget_paymentaccount ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
839  public function get_paymentaccount($__type="default")
840  {
841      $object = is_null(keyval($this->property_objects_array,"{$__type}_paymentaccount")) ? new paymentaccount($this->get_paymentaccount_id($__type)) : $this->property_objects_array["{$__type}_paymentaccount"];
842      $this->property_objects_array["{$__type}_paymentaccount"] = $object;
843      return $object;
844  }
publicget_paymentaccount_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
845  public function get_paymentaccount_id($__type="default")
846  {
847      $ids = $this->get_paymentaccount_ids($__type, true);
848      return (count($ids)==1 ? $ids[0] : null);
849  }
publicget_paymentaccount_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
850  public function get_paymentaccount_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
851  {
852      $paymentaccount_ids = array();
853      $db = entity::db();
854      $q  = " SELECT com_paymentaccount.id FROM com_entity_paymentaccount INNER JOIN com_paymentaccount ON com_entity_paymentaccount.paymentaccount_id=com_paymentaccount.id AND com_entity_paymentaccount.deleted=0 AND com_paymentaccount.deleted=0 AND com_entity_paymentaccount.entity_id='$this->id' " . (is_null($__type) ? "" : " AND com_entity_paymentaccount.entity_paymentaccount_type_id='" . entity_paymentaccount::type_id($__type) . "'") . ($__get_primary ? " AND com_entity_paymentaccount.primary=1 " : "");
855      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
856      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
857      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
858      $db->query($q);
859      while ($db->next_record())
860      {
861          $paymentaccount_ids[] = $db->f("id");
862      }
863      return $paymentaccount_ids;
864  }
publicget_paymentaccount_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
865  public function get_paymentaccount_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
866  {
867      $ids = $this->get_paymentaccount_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
868      $objects = array();
869      foreach ($ids as $index=>$id)
870      {
871          $objects[$index] = new paymentaccount($id);
872      }
873      return $objects;
874  }
publicget_perm ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
677  public function get_perm($__type="default")
678  {
679      $object = is_null(keyval($this->property_objects_array,"{$__type}_perm")) ? new perm($this->get_perm_id($__type)) : $this->property_objects_array["{$__type}_perm"];
680      $this->property_objects_array["{$__type}_perm"] = $object;
681      return $object;
682  }
publicget_perm_id ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
683  public function get_perm_id($__type="default")
684  {
685      $ids = $this->get_perm_ids($__type, true);
686      return (count($ids)==1 ? $ids[0] : null);
687  }
publicget_perm_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
688  public function get_perm_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
689  {
690      $perm_ids = array();
691      $db = user::db();
692      $q  = " SELECT cor_perm.id FROM cor_perm_user INNER JOIN cor_perm ON cor_perm_user.perm_id=cor_perm.id AND cor_perm_user.deleted=0 AND cor_perm.deleted=0 AND cor_perm_user.user_person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_perm_user.perm_user_type_id='" . perm_user::type_id($__type) . "'") . ($__get_primary ? " AND cor_perm_user.primary=1 " : "");
693      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
694      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
695      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
696      $db->query($q);
697      while ($db->next_record())
698      {
699          $perm_ids[] = $db->f("id");
700      }
701      return $perm_ids;
702  }
publicget_perm_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
703  public function get_perm_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
704  {
705      $ids = $this->get_perm_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
706      $objects = array();
707      foreach ($ids as $index=>$id)
708      {
709          $objects[$index] = new perm($id);
710      }
711      return $objects;
712  }
publicget_perms ( )[ user_ext ]
Parameters
No parameters for this method
Code
047  public function get_perms()
048  {
049      $role_perm_ids = array();
050      foreach ($this->role_list as $role)
051      {
052          $role_perm_ids = array_merge($role_perm_ids,$role->perm_ids);
053      }
054      $perm_ids = array_unique(array_merge($role_perm_ids,$this->perm_ids));
055      return $perm_ids;
056  }
publicget_person ( )[ user_db ]
Parameters
No parameters for this method
Code
431  public function get_person()
432  {
433      return new person($this->person_id);
434  }
publicget_person_type ( )[ person_db ]
Parameters
No parameters for this method
Code
414  public function get_person_type()
415  {
416      return new person_type($this->person_type_id);
417  }
publicget_persondate ( type ["default"] )[ person_db ]
Parameters
optionaltype ["default"]
Code
525  public function get_persondate($__type="default")
526  {
527      $object = is_null(keyval($this->property_objects_array,"{$__type}_persondate")) ? new persondate($this->get_persondate_id($__type)) : $this->property_objects_array["{$__type}_persondate"];
528      $this->property_objects_array["{$__type}_persondate"] = $object;
529      return $object;
530  }
publicget_persondate_id ( type ["default"] )[ person_db ]
Parameters
optionaltype ["default"]
Code
531  public function get_persondate_id($__type="default")
532  {
533      $ids = $this->get_persondate_ids($__type, true);
534      return (count($ids)==1 ? $ids[0] : null);
535  }
publicget_persondate_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ person_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
536  public function get_persondate_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
537  {
538      $persondate_ids = array();
539      $db = person::db();
540      $q  = " SELECT cor_persondate.id FROM cor_person_persondate INNER JOIN cor_persondate ON cor_person_persondate.persondate_id=cor_persondate.id AND cor_person_persondate.deleted=0 AND cor_persondate.deleted=0 AND cor_person_persondate.person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_person_persondate.person_persondate_type_id='" . person_persondate::type_id($__type) . "'") . ($__get_primary ? " AND cor_person_persondate.primary=1 " : "");
541      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
542      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
543      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
544      $db->query($q);
545      while ($db->next_record())
546      {
547          $persondate_ids[] = $db->f("id");
548      }
549      return $persondate_ids;
550  }
publicget_persondate_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ person_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
551  public function get_persondate_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
552  {
553      $ids = $this->get_persondate_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
554      $objects = array();
555      foreach ($ids as $index=>$id)
556      {
557          $objects[$index] = new persondate($id);
558      }
559      return $objects;
560  }
publicget_phone ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1135  public function get_phone($__type="default")
1136  {
1137      $object = is_null(keyval($this->property_objects_array,"{$__type}_phone")) ? new phone($this->get_phone_id($__type)) : $this->property_objects_array["{$__type}_phone"];
1138      $this->property_objects_array["{$__type}_phone"] = $object;
1139      return $object;
1140  }
publicget_phone_id ( type ["default"] )[ entity_db ]
Parameters
optionaltype ["default"]
Code
1141  public function get_phone_id($__type="default")
1142  {
1143      $ids = $this->get_phone_ids($__type, true);
1144      return (count($ids)==1 ? $ids[0] : null);
1145  }
publicget_phone_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1146  public function get_phone_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1147  {
1148      $phone_ids = array();
1149      $db = entity::db();
1150      $q  = " SELECT cor_phone.id FROM cor_entity_phone INNER JOIN cor_phone ON cor_entity_phone.phone_id=cor_phone.id AND cor_entity_phone.deleted=0 AND cor_phone.deleted=0 AND cor_entity_phone.entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_entity_phone.entity_phone_type_id='" . entity_phone::type_id($__type) . "'") . ($__get_primary ? " AND cor_entity_phone.primary=1 " : "");
1151      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
1152      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
1153      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
1154      $db->query($q);
1155      while ($db->next_record())
1156      {
1157          $phone_ids[] = $db->f("id");
1158      }
1159      return $phone_ids;
1160  }
publicget_phone_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ entity_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1161  public function get_phone_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1162  {
1163      $ids = $this->get_phone_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
1164      $objects = array();
1165      foreach ($ids as $index=>$id)
1166      {
1167          $objects[$index] = new phone($id);
1168      }
1169      return $objects;
1170  }
publicget_post ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
1172  public function get_post($__type="default")
1173  {
1174      $object = is_null(keyval($this->property_objects_array,"{$__type}_post")) ? new post($this->get_post_id($__type)) : $this->property_objects_array["{$__type}_post"];
1175      $this->property_objects_array["{$__type}_post"] = $object;
1176      return $object;
1177  }
publicget_post_id ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
1178  public function get_post_id($__type="default")
1179  {
1180      $ids = $this->get_post_ids($__type, true);
1181      return (count($ids)==1 ? $ids[0] : null);
1182  }
publicget_post_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1183  public function get_post_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1184  {
1185      $post_ids = array();
1186      $db = user::db();
1187      $q  = " SELECT forum_post.id FROM forum_post_user INNER JOIN forum_post ON forum_post_user.post_id=forum_post.id AND forum_post_user.deleted=0 AND forum_post.deleted=0 AND forum_post_user.user_person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND forum_post_user.post_user_type_id='" . post_user::type_id($__type) . "'") . ($__get_primary ? " AND forum_post_user.primary=1 " : "");
1188      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
1189      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
1190      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
1191      $db->query($q);
1192      while ($db->next_record())
1193      {
1194          $post_ids[] = $db->f("id");
1195      }
1196      return $post_ids;
1197  }
publicget_post_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1198  public function get_post_list($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1199  {
1200      $ids = $this->get_post_ids($__type, $__order, $__where_clause, $__limit, $__offset, $__get_primary);
1201      $objects = array();
1202      foreach ($ids as $index=>$id)
1203      {
1204          $objects[$index] = new post($id);
1205      }
1206      return $objects;
1207  }
publicget_preference ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
1073  public function get_preference($__type="default")
1074  {
1075      $object = is_null(keyval($this->property_objects_array,"{$__type}_preference")) ? new preference($this->get_preference_id($__type)) : $this->property_objects_array["{$__type}_preference"];
1076      $this->property_objects_array["{$__type}_preference"] = $object;
1077      return $object;
1078  }
publicget_preference_id ( type ["default"] )[ user_db ]
Parameters
optionaltype ["default"]
Code
1079  public function get_preference_id($__type="default")
1080  {
1081      $ids = $this->get_preference_ids($__type, true);
1082      return (count($ids)==1 ? $ids[0] : null);
1083  }
publicget_preference_ids ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause
optionallimit
optionaloffset [0]
optionalget_primary [false]
Code
1084  public function get_preference_ids($__type=null, $__order=null, $__where_clause=null, $__limit=null, $__offset=0, $__get_primary=false)
1085  {
1086      $preference_ids = array();
1087      $db = user::db();
1088      $q  = " SELECT cor_preference.id FROM cor_preference_user INNER JOIN cor_preference ON cor_preference_user.preference_id=cor_preference.id AND cor_preference_user.deleted=0 AND cor_preference.deleted=0 AND cor_preference_user.user_person_entity_id='$this->id' " . (is_null($__type) ? "" : " AND cor_preference_user.preference_user_type_id='" . preference_user::type_id($__type) . "'") . ($__get_primary ? " AND cor_preference_user.primary=1 " : "");
1089      $q .= is_null($__where_clause) ? "" : " WHERE {$__where_clause}";
1090      $q .= is_null($__order) ? "" : " ORDER BY {$__order}";
1091      $q .= is_null($__limit) ? "" : " LIMIT {$__offset}, {$__limit}";
1092      $db->query($q);
1093      while ($db->next_record())
1094      {
1095          $preference_ids[] = $db->f("id");
1096      }
1097      return $preference_ids;
1098  }
publicget_preference_list ( type , order , where_clause , limit , offset [0] , get_primary [false] )[ user_db ]
Parameters
optionaltype
optionalorder
optionalwhere_clause