コード例 #1
0
ファイル: ElggUser.php プロジェクト: gzachos/elgg_ellak
 /**
  * Load the ElggUser data from the database
  *
  * @param mixed $guid ElggUser GUID or stdClass database row from entity table
  *
  * @return bool
  */
 protected function load($guid)
 {
     $attr_loader = new Elgg_AttributeLoader(get_class(), 'user', $this->attributes);
     $attr_loader->secondary_loader = 'get_user_entity_as_row';
     $attrs = $attr_loader->getRequiredAttributes($guid);
     if (!$attrs) {
         return false;
     }
     $this->attributes = $attrs;
     $this->tables_loaded = 2;
     $this->loadAdditionalSelectValues($attr_loader->getAdditionalSelectValues());
     _elgg_cache_entity($this);
     return true;
 }
コード例 #2
0
 /**
  * Load the ElggGroup data from the database
  *
  * @param mixed $guid GUID of an ElggGroup entity or database row from entity table
  *
  * @return bool
  */
 protected function load($guid)
 {
     $attr_loader = new Elgg_AttributeLoader(get_class(), 'group', $this->attributes);
     $attr_loader->requires_access_control = !$this instanceof ElggPlugin;
     $attr_loader->secondary_loader = 'get_group_entity_as_row';
     $attrs = $attr_loader->getRequiredAttributes($guid);
     if (!$attrs) {
         return false;
     }
     $this->attributes = $attrs;
     $this->tables_loaded = 2;
     $this->loadAdditionalSelectValues($attr_loader->getAdditionalSelectValues());
     _elgg_cache_entity($this);
     return true;
 }