Retrieve User information.
@param IncomingMessage $matchingMessage
@return User
197319
public function getUser(IncomingMessage $matchingMessage)
    {
        $user = null;
        $this->client->getUserById($matchingMessage->getSender())->then(function ($_user) use (&$user) {
            $user = $_user;
        });
        if (! is_null($user) && $user instanceof SlackUser) {
            return new User($this->client, $user->getRawUser());
        }

        return new User($this->client, ['id' => $matchingMessage->getSender()]);
    }
124460
public function sendRequest($endpoint, array $parameters, IncomingMessage $matchingMessage)
    {
        return $this->http->post('https://api.wechat.com/cgi-bin/'.$endpoint.'?access_token='.$this->getAccessToken(),
            [], $parameters, [], true);
    }
1093057
protected User safeGetSender(MessageEnvelope envelope) {
		if (envelope != null && envelope.getSender() != null
				&& envelope.getSender().getId() != null) {
			return envelope.getSender();
		}
		return new User();
	}
908112
protected function getMessage($user)
    {
        $resetUrl = $this->generateUrl(
            static::$resetRouteId,
            ['token' => $user->getPasswordResetToken()],
            UrlGeneratorInterface::ABSOLUTE_URL
        );
        $template = $this->getParameter('sulu_security.reset_password.mail.template');
        $translationDomain = $this->getParameter('sulu_security.reset_password.mail.translation_domain');

        if (!$this->get('templating')->exists($template)) {
            throw new EmailTemplateException($template);
        }

        return trim(
            $this->renderView(
                $template,
                [
                    'user' => $user,
                    'reset_url' => $resetUrl,
                    'translation_domain' => $translationDomain,
                ]
            )
        );
    }
1277551
public function getMessages()
    {
        if ($this->event->get('MsgType') === 'text') {
            $text = $this->event->get('Content');
        } else {
            $text = $this->event->get('Url');
        }

        return [
            new IncomingMessage($text, $this->event->get('FromUserName'),
                $this->event->get('ToUserName'), $this->event),
        ];
    }
412468
public function getUser(IncomingMessage $matchingMessage)
    {
        $response = $this->http->get('https://api.kik.com/v1/user/'.$matchingMessage->getSender(), [], [
            'Content-Type:application/json',
            'Authorization:Basic '.$this->getRequestCredentials(),
        ]);
        $profileData = json_decode($response->getContent(), true);

        if ($response->getStatusCode() != 200) {
            throw new KikException('Error getting user info: '.$response->getContent());
        }

        return new User($matchingMessage->getSender(), $profileData['firstName'], $profileData['lastName'], $matchingMessage->getSender(), $profileData);
    }
78215
public function sendRequest($endpoint, array $parameters, IncomingMessage $matchingMessage)
    {
        $payload = array_merge_recursive([
            'to' => $matchingMessage->getSender(),
            'chatId' => $matchingMessage->getRecipient(),
        ], $parameters);

        return $this->sendPayload(['messages' => [$payload]]);
    }
127830
public function retrieveById($identifier)
    {
        $user = $this->conn->table($this->table)->find($identifier);

        if (! is_null($user)) {
            return new GenericUser((array) $user);
        }
    }
320806
public function retrieveById($identifier)
    {
        $userService = app()->make(UserService::class);
        $user = $userService->byId($identifier)->get();

        if (! $user) {
            return null;
        }

        return $user;
    }
195732
protected function createGetUserRequest(Message $message, NodeRef $nodeRef, Pbjx $pbjx): GetUserRequest
    {
        /** @var GetUserRequest $request */
        $request = GetUserRequestV1Mixin::findOne()->createMessage();
        return $request;
    }
1194988
public function getUser(): User
    {
        if ($this->sender !== null) {
            return $this->sender;
        }

        $userId = (string) $this->request->getParameter('object.user_id');
        $request = $this->http->get(self::API_URL.'users.get', [
            'query' => [
                'user_ids' => $userId,
                'v' => self::API_VERSION,
            ],
        ]);
        $response = json_decode($request->getBody()->getContents(), true);
        $user = $response['response'][0];

        return $this->sender = new User(
            (string) $user['id'],
            $user['first_name'].' '.$user['last_name']
        );
    }
244286
static function fetchByUserIdentifier( $userIdentifier, $contentObjectID = false, $asObject = true )
    {
        $conditions = array( 'user_identifier' => $userIdentifier );
        if ( $contentObjectID )
            $conditions['contentobject_id'] = $contentObjectID;
        return eZPersistentObject::fetchObject( eZInformationCollection::definition(),
                                                null,
                                                $conditions,
                                                $asObject );
    }
74762
private function getUser()
	{
		if ($this->_user === false) {
			$this->_user = Administrator::findByEmail($this->email);
		}
		return $this->_user;
	}
741556
public function getUserIdByMappedEmailAddress() {

        // get the mapped recipient (valid because $this->isInboundEmailToEmailAddressMapToUser() is already done)
        $mappedRoutes = config('lasallecmsmailgun.inbound_map_mailgun_routes_with_user_email_address');

        foreach ($mappedRoutes as $route => $user) {

            // if "from" email address is the same as the route specified in the config...
            if ($this->request->input('recipient') == $route) {
                $userEmailAddress = $user;
            }
        }

        return $this->userRepository->findUserIdByEmail($userEmailAddress);
    }
1334567
public static function oneByMessageAndUser($mid, $uid)
	{
		return self::all()
			->whereEquals('mid', $mid)
			->whereEquals('uid', $uid)
			->row();
	}
355344
public function getUser($email)
    {
        $user = $this->userMapper->findByEmail($email);

        if (!$user) {
            return false;
        }

        return $user;
    }
943768
public function getUser(): ?string
    {
        return $this->encodeComponent($this->user, self::NO_ENCODING, self::REGEXP_USERINFO_ENCODING);
    }