ElggUser::load PHP Method

load() protected method

Load the \ElggUser data from the database
protected load ( mixed $guid ) : boolean
$guid mixed \ElggUser GUID or \stdClass database row from entity table
return boolean
    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->loadAdditionalSelectValues($attr_loader->getAdditionalSelectValues());
        _elgg_services()->entityCache->set($this);
        return true;
    }