Returns the Client object matching the given unique identifier.

@param  string $uid
@throws Exception
@return Client
766680
public function clientGetByUid($uid)
  {
    foreach($this->clientList() as $client)
    {
      if($client["client_unique_identifier"] == $uid) return $client;
    }

    throw new Exception("invalid clientID", 0x200);
  }
1002611
public function getById(int $iID) {

		if ($iID < 1) {
			throw new TangoException('id error');
		}

		if (array_key_exists($iID, static::$_lPool)) {
			$aReturn = static::$_lPoolForName[$iID];
			if (count($aReturn) === 1) {
				return current($aReturn);
			}
			return $aReturn;
		}

		static::_checkPreload();
		static::_checkPoolFull();

		$sQuery = sprintf(
			'SELECT `%s` FROM `%s` WHERE `%s` = ?',
			implode('`, `', static::$_lKeySearch),
			static::$_sDBTable,
			static::$_sKeyID
		);

		$oDB = static::_getDB();
		$aRow = $oDB->getRow($sQuery, [$iID]);
		if (!$aRow) {
			static::$_iPoolNum--;
			return FALSE;
		}

		$sHash = static::_hash($aRow);

		static::$_lPool[$iID] = $sHash;
		static::$_lPoolForName[$iID] = $aRow;
		if (static::$_lPoolForSort) {
			static::$_lPoolForSort[$iID] = TRUE;
		}

		if (count($aRow) === 1) {
			return current($aRow);
		}
		return $aRow;
	}
1330997
protected function getClient()
    {
        if ($this->client instanceof ClientInterface) {
            return $this->client;
        }

        if (empty($this->apiKey)) {
            throw new Exception('Use of connector not possible without API key', Exception::INVALID_API_KEY);
        }

        $this->client = new Client([
            'connect_timeout' => 10,
            'base_uri' => $this->serviceUrl,
            'headers' => array_merge($this->extraHeaders, [
                'User-Agent' => 'Connector-PHP/2',
                'X-Api-Key' => $this->apiKey,
            ])
        ]);

        return $this->client;
    }
89963
public function update($uid)
    {
        if (!Input::has('user')) {
            return $this->jsonErrorResponse('"user" is required.');
        }

        $user = Subbly::api('subbly.user')->update($uid, Input::get('user'));

        return $this->jsonResponse(array(
            'user' => $this->presenter->single($user),
        ),
        array(
            'status' => array(
                'code'    => 200,
                'message' => 'User updated',
            ),
        ));
    }
986356
public function enableUser($uid): ResponseInterface
    {
        return $this->updateUser(
            Request\UpdateUser::new()
                ->withUid($uid)
                ->markAsEnabled()
        );
    }
1271041
public function getPidFromUid($uid = 0)
    {
        $queryBuilder = self::getQueryBuilder();
        $triggerElement = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'uid',
                    $queryBuilder->createNamedParameter(abs($uid), \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetch();
        $pid = (int)$triggerElement['pid'];
        return is_array($triggerElement) && $pid ? $pid : 0;
    }
1005522
public function read(string $identifier): ?ClientInterface
    {
        try {
            return $this->readResource($identifier);
        } catch (RepositoryException $exception) {
            $message = 'Reading client failed.';
            throw new RepositoryException($message, 0, $exception);
        }
    }
110137
public function getHeader( $uid = '' )
	{
		$view = $this->getView();

		try
		{
			if( !isset( $this->view ) ) {
				$view = $this->view = $this->getObject()->addData( $view, $this->tags, $this->expire );
			}

			$html = '';
			foreach( $this->getSubClients() as $subclient ) {
				$html .= $subclient->setView( $view )->getHeader( $uid );
			}
			$view->selectHeader = $html;

			/** client/html/locale/select/standard/template-header
			 * Relative path to the HTML header template of the locale select client.
			 *
			 * The template file contains the HTML code and processing instructions
			 * to generate the HTML code that is inserted into the HTML page header
			 * of the rendered page in the frontend. The configuration string is the
			 * path to the template file relative to the templates directory (usually
			 * in client/html/templates).
			 *
			 * You can overwrite the template file configuration in extensions and
			 * provide alternative templates. These alternative templates should be
			 * named like the default one but with the string "standard" replaced by
			 * an unique name. You may use the name of your project for this. If
			 * you've implemented an alternative client class as well, "standard"
			 * should be replaced by the name of the new class.
			 *
			 * @param string Relative path to the template creating code for the HTML page head
			 * @since 2014.09
			 * @category Developer
			 * @see client/html/locale/select/standard/template-body
			 */
			$tplconf = 'client/html/locale/select/standard/template-header';
			$default = 'locale/select/header-standard';

			return $view->render( $view->config( $tplconf, $default ) );
		}
		catch( \Exception $e )
		{
			$this->logException( $e );
		}
	}
1072144
public function get($uid) {
  $query = new \Peyote\Select('media');
  $query->columns('media.uid',
                  'media.file',
                  'media.format',
                  'media.hash',
                  'media.width',
                  'media.height',
                  'media.size',
                  'media.type',
                  'storage.type AS storage_type',
                  'storage.id AS storage_id',
                  'storage.path',
                  'storage.endpoint',
                  'storage.bucket')
        ->join('storage', 'inner')
        ->on('storage.id', '=', 'media.storage')
        ->where('media.uid', '=', $uid);
  $results = $this->db->fetch($query);
  $formatter = new \Rych\ByteSize\Formatter\Binary;
  $bytesize = new \Rych\ByteSize\ByteSize($formatter);
  foreach ($results as $m) {
   $result[$m['type']] = $m;
   $siteURL = $this->siteURL();
   switch ($m['storage_type']) {
    case 'local':
     $result[$m['type']]['url'] = $siteURL['scheme'] .'://' . $m['path'] . $result[$m['type']]['file'];
     break;
    case 's3':
     $result[$m['type']]['url'] = $siteURL['scheme'] .'://' . $m['bucket'] . '.' . $m['endpoint'] . '/' . $result[$m['type']]['file'];
     break;
   }
   $result[$m['type']]['readable_size'] = $bytesize->format($result[$m['type']]['size']);
  }
  return $result;
 }
893000
protected function getContentObject($uid)
    {
        $contentTable = 'tt_content';
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($contentTable);
        $queryBuilder
            ->select('*')
            ->from($contentTable)
            ->where($queryBuilder->expr()->eq('uid', $uid));
        $queryBuilder->getRestrictions()->removeAll();
        $data = $queryBuilder->execute()->fetch();

        $this->inlineHelper->addFilesToData($data, 'tt_content');
        $this->inlineHelper->addIrreToData($data);

        return $data;
    }
839038
public static function getById($uid)
    {    
		if ($uid == USER_ANONYMOUS) return new User\Anonymous();
        $fields = self::getDbConnection()->fetchAssoc( 'SELECT * FROM '.User::TABLE.' WHERE id = ?', array( $uid ) );
        if (!$fields) throw new \Exception('User:'.$uid.' is not found'); 
        return self::fetch($fields);    
  	}
1206939
protected function getBaseUser($uid)
    {
        $query = "SELECT email, password, isactive FROM {$this->config->table_users} WHERE id = :id";
        $query_prepared = $this->dbh->prepare($query);
        $query_prepared->execute(['id' => $uid]);

        $data = $query_prepared->fetch(\PDO::FETCH_ASSOC);

        if (!$data) {
            return false;
        }

        $data['uid'] = $uid;

        return $data;
    }
920171
public function show($uid)
    {
        $options = $this->getParams('includes');

        $user = Subbly::api('subbly.user')->find($uid, $options);

        return $this->jsonResponse(array(
            'user' => $this->presenter->single($user),
        ));
    }
75308
public function getBody( $uid = '' )
	{
		$view = $this->getView();

		$content = '';
		foreach( $this->getSubClients() as $subclient ) {
			$content .= $subclient->setView( $view )->getBody( $uid );
		}
		$view->introBody = $content;

		/** client/html/email/payment/text/intro/standard/template-body
		 * Relative path to the text body template of the email payment text introduction client.
		 *
		 * The template file contains the text and processing instructions
		 * to generate the result shown in the body of the e-mail. The
		 * configuration string is the path to the template file relative
		 * to the templates directory (usually in client/html/templates).
		 *
		 * You can overwrite the template file configuration in extensions and
		 * provide alternative templates. These alternative templates should be
		 * named like the default one but with the string "standard" replaced by
		 * an unique name. You may use the name of your project for this. If
		 * you've implemented an alternative client class as well, "standard"
		 * should be replaced by the name of the new class.
		 *
		 * The email payment text client allows to use a different template for
		 * each payment status value. You can create a template for each payment
		 * status and store it in the "email/payment/<status number>/" directory
		 * below the "templates" directory (usually in client/html/templates). If no
		 * specific layout template is found, the common template in the
		 * "email/payment/" directory is used.
		 *
		 * @param string Relative path to the template creating code for the e-mail body
		 * @since 2014.03
		 * @category Developer
		 * @see client/html/email/payment/text/intro/standard/template-header
		 */
		$tplconf = 'client/html/email/payment/text/intro/standard/template-body';

		$status = $view->extOrderItem->getPaymentStatus();
		$default = array( 'email/payment/' . $status . '/text-intro-body-standard', 'email/payment/text-intro-body-standard' );

		return $view->render( $view->config( $tplconf, $default ) );
	}
1281804
@Basic
    @Column(name = "UIDENT", unique = true, nullable = false, length=255)
    public String getUid()
    {
        return this.uid;
    }
12943
public function getHeader( $uid = '' )
	{
		$context = $this->getContext();
		$site = $context->getLocale()->getSiteId();
		$view = $this->getView();

		$config = $context->getConfig()->get( 'client/html/basket/mini', [] );
		$key = $this->getParamHash( [], $uid . $site . ':basket:mini-header', $config );

		if( ( $html = $this->getBasketCached( $key ) ) === null )
		{
			try
			{
				if( !isset( $this->view ) ) {
					$view = $this->view = $this->getObject()->addData( $view );
				}

				$output = '';
				foreach( $this->getSubClients() as $subclient ) {
					$output .= $subclient->setView( $view )->getHeader( $uid );
				}
				$view->miniHeader = $output;

				/** client/html/basket/mini/standard/template-header
				 * Relative path to the HTML header template of the basket mini client.
				 *
				 * The template file contains the HTML code and processing instructions
				 * to generate the HTML code that is inserted into the HTML page header
				 * of the rendered page in the frontend. The configuration string is the
				 * path to the template file relative to the templates directory (usually
				 * in client/html/templates).
				 *
				 * You can overwrite the template file configuration in extensions and
				 * provide alternative templates. These alternative templates should be
				 * named like the default one but with the string "standard" replaced by
				 * an unique name. You may use the name of your project for this. If
				 * you've implemented an alternative client class as well, "standard"
				 * should be replaced by the name of the new class.
				 *
				 * @param string Relative path to the template creating code for the HTML page head
				 * @since 2014.03
				 * @category Developer
				 * @see client/html/basket/mini/standard/template-body
				 */
				$tplconf = 'client/html/basket/mini/standard/template-header';
				$default = 'basket/mini/header-standard';

				$html = $view->render( $view->config( $tplconf, $default ) );
				$this->setBasketCached( $key, $html );
			}
			catch( \Exception $e )
			{
				$this->logException( $e );
			}
		}
		else
		{
			$html = $this->modifyHeader( $html, $uid );
		}

		return $html;
	}
922056
public static function retrieve($uuid, ClientInterface $client = null)
    {
        return (new RequestService($client))
            ->setResourceClass(static::class)
            ->get($uuid);
    }