Load customer user info

@param null|int $id Customer Id
@return Inchoo_SocialConnect_Model_Facebook_Userinfo
167445
public function load($id = null)
    {
        if(is_null($id) && Mage::getSingleton('customer/session')->isLoggedIn()) {
            $this->customer = Mage::getSingleton('customer/session')->getCustomer();
        } else if(is_int($id)){
            $this->customer = Mage::getModel('customer/customer')->load($id);
            
            // TODO: Implement
        }

        if(!$this->customer->getId()) {
            return $this;
        }

        if(!($socialconnectFid = $this->customer->getInchooSocialconnectFid()) ||
                !($socialconnectFtoken = $this->customer->getInchooSocialconnectFtoken())) {
            return $this;
        }

        $this->setAccessToken(unserialize($socialconnectFtoken));
        $this->_load();

        return $this;
    }
830223
private function getUserById($id)
    {
        $user = $this->userService->findUserById($id);

        if (empty($user)) {
            throw $this->createNotFoundException('user not found');
        }

        return $user;
    }
49281
public function loadUser( $id )
    {
        /** @var \eZ\Publish\API\Repository\Repository $repository */
        $repository = $this->getRepository();
        $userService = $repository->getUserService();

        $user = $repository->sudo(
            function() use( $id, $userService )
            {
                return $userService->loadUser( $id );
            }
        );

        return $user;
    }
307087
public function getServiceById($id)
    {
        if ($name = $this->getServiceNameById($id)) {
            return $this->getService($name);
        }

        return null;
    }
979965
public function get(int $id, CustomerRequest $customerRequest = null): Customer
    {
        $customerResource = $this->restClient->getResource(
            Customer::class,
            sprintf('/v2/customers/%d', $id)
        );

        return $this->hydrateCustomerWithSubEntities(
            $customerResource,
            $customerRequest ?: new CustomerRequest()
        );
    }
150587
public function getPage($id)
    {
        return isset($this->pages[$id])?$this->pages[$id]:null;
    }
1370419
public function loadFromFlexiBee($id = null)
    {
        $result = $this->adresar->loadFromFlexiBee($id);
        $this->takeData($this->adresar->getData());
        return $result;
    }
1093904
public function show($id)
    {
        $user = $this->userRepo->getById($id);
        if (!empty($user)) {
            $this->authorize('read', $user);
            return $this->respondWithSuccess($user, new UserTransformer);
        }
        return $this->respondNotFound();
    }
938024
public function getUser($id = null) : ?Authenticatable
    {
        if ($id === null) {
            return $this->getModel();
        }

        if (is_int($id)) {
            return $this->getById($id);
        }

        if (filter_var($id, FILTER_VALIDATE_EMAIL) !== false) {
            return $this->getByEmail($id);
        }

        return $this->getModel();
    }
967859
public function getConnection($id = null)
    {
        if (null === $id) {
            $result = self::$connection;

        } else {
            if (false === isset(self::$connection[$id])) {
                throw new \Doozr_Exception(
                    sprintf(
                        'EntityManager connection with Id "%s" does not exist!',
                        $id
                    )
                );
            }

            $result = self::$connection[$id];
        }

        return $result;
    }
196786
public function customers($id)
    {
        $customers = $this->execute(
            self::HTTP_GET,
            self::DOMUSERP_API_OPERACIONAL . '/setorcomercial/' . $id . '/clientes'
        );

        return $customers;
    }
763623
private function loadCardDetailsModel($id=NULL)
	{
		if ($id == NULL)
			throw new CHttpException(400, Yii::t('Api.card', 'Missing card ID'));

		$model = UserMetadata::model()->getPrototype('UserMetadata', array(
		             'user_id' => $this->user->id,
		             'key' => $id.'_card_settings'
		         ), array('value' => '{}'));

		$model->value = CJSON::decode($model->value);

		return $model;
	}
1322391
public function profile($id = null)
    {
        $this->loadModel('User.Users');
        $id = $id === null ? user()->id : $id;
        $conditions = [];

        if ($id != user()->id) {
            $conditions = ['status' => 1, 'public_profile' => true];
        }

        $user = $this->Users->get(intval($id), ['conditions' => $conditions]);

        $this->title(__d('user', 'User’s Profile'));
        $this->viewMode('full');
        $this->set(compact('user'));
    }
131978
public function read($id)
    {
        if (!$data = $this->getCache()->load($this->normalizeId($id))) {
            return null;
        }

        return $data;
    }
776976
public static function loadUserInfoBypass($user_id)
    {
        global $CFG, $PDOX, $CONTEXT;
        $cacheloc = 'lti_user';
        $row = Cache::check($cacheloc, $user_id);
        if ( $row != false ) return $row;
        $stmt = $PDOX->queryDie(
            "SELECT displayname, email, user_key FROM {$CFG->dbprefix}lti_user AS U
            JOIN {$CFG->dbprefix}lti_membership AS M
            ON U.user_id = M.user_id AND M.context_id = :CID
            WHERE U.user_id = :UID",
            array(":UID" => $user_id, ":CID" => $CONTEXT->id)
        );
        $row = $stmt->fetch(\PDO::FETCH_ASSOC);
        if ( strlen($row['displayname']) < 1 && strlen($row['user_key']) > 0 ) {
            $row['displayname'] = 'user_key:'.substr($row['user_key'],0,25);
        }
        Cache::set($cacheloc, $user_id, $row);
        return $row;
    }
1233732
public function getByID($id)
    {
        if(array_key_exists($id, $this->idToSlugCache))
            $slug = $this->idToSlugCache[$id];
        else
            $slug = $this->SystemCache->get($this->getModel()->getTableName().':id:'.$id);

        if (!empty($slug)) {
            return $this->getBySlug($slug);
        }

        $this->loadSource();

        if(!isset($this->slugsByID[$id]))
            return null;

        $slug = $this->slugsByID[$id];

        return $this->getBySlug($slug);
    }
834632
public function load($id = null) {
		// fill the object with blank properties based on the fields of that table
		$fields = $this->fields();
		foreach ($fields as $key => $field) {
			$this->{$key} = $this->{$key} ? $this->{$key} : '';
		}

		if (!$id && $this->dbId()) {
			$id = $this->dbId();
		}

		if (is_object($id)) {
			$node = $id;

		} elseif (is_array($id)) {
			$node = (object)$id;

		} elseif ($id) {
			if (!$node) {
				$node = (object)$this->db()->get('select * from `' . $this->table() . '` where `'.$this->idVar().'` = ? limit 1', [$id])[0];
			}
		}

		if (!$node) {
			$node = new Model;
		}

		if (isset($node)) {
			foreach(get_object_vars($node) as $var => $value) {
				$this->$var = $value;
			}
		}

		foreach ($this->fields() as $field) {
			switch ($field->type) {
				case 'int':
					$this->{$field->field} = (int)$this->{$field->field};
					break;
				case 'boolean':
					$this->{$field->field} = $this->{$field->field} ? true : false;
					break;
			}
		}

		if ($this->tipsy() && $this->tipsy()->config()['tipsy']['factory'] !== false) {
			$this->tipsy()->factory($this);
		}

		return $this;
	}