Returns User object.
552086
def people_findByEmail(email):
    """"""
    method = 'flickr.people.findByEmail'
    data = _doget(method, find_email=email)
    user = User(data.rsp.user.id, username=data.rsp.user.username.text)
    return user
872707
def user(self):
        
        if self._user is not None:
            return self._user

        cert = self.transport.getPeerCertificate()
        self._user = user = userForCert(self.store, cert)
        return user
601123
def me(cls, api=None):
        
        api = api if api else cls._API
        extra = {
            'resource': cls.__name__,
            'query': {}
        }
        logger.info('Fetching user information', extra=extra)
        user_data = api.get(cls._URL['me']).json()
        return User(api=api, **user_data)
2185
def get_object(self, queryset=None):
        
        profile, dummy = ForumProfile.objects.get_or_create(user=self.request.user)
        return profile
879471
def get(self, user_id):
        """"""
        user = db.User.find_one(User.user_id == user_id)
        roles = db.Role.all()

        if not user:
            return self.make_response('Unable to find the user requested, might have been removed', HTTP.NOT_FOUND)

        return self.make_response({
            'user': user.to_json(),
            'roles': roles
        }, HTTP.OK)
802628
def currentUser(extras=nil)
      method = 'currentUser'
      type = User
      args = {}
      args[:extras] = extras if extras
      return_object type,method,args,true
    end
207776
public function getUser()
    {
        if (null === $token = $this->securityContext->getToken()) {
            return;
        }

        if (!is_object($user = $token->getUser())) {
            return;
        }

        return $user;
    }
214026
def get_user(self, login=github.GithubObject.NotSet):
        
        assert login is github.GithubObject.NotSet or isinstance(login, (str, unicode)), login
        if login is github.GithubObject.NotSet:
            return AuthenticatedUser.AuthenticatedUser(self.__requester, {}, {"url": "/user"}, completed=False)
        else:
            headers, data = self.__requester.requestJsonAndCheck(
                "GET",
                "/users/" + login
            )
            return github.NamedUser.NamedUser(self.__requester, headers, data, completed=True)
1309092
def get_user(self, name):
        
        return self._api_get('/api/users/{0}'.format(
            urllib.parse.quote_plus(name)
        ))
1338047
private function get_user() {
        $userid = $this->backuprec->userid;
        $user = core_user::get_user($userid, '*', MUST_EXIST);

        return $user;
    }
646926
def get_object(self):
        
        if hasattr(self, "organization_user"):
            return self.organization_user
        organization_pk = self.kwargs.get("organization_pk", None)
        user_pk = self.kwargs.get("user_pk", None)
        self.organization_user = get_object_or_404(
            self.get_user_model().objects.select_related(),
            user__pk=user_pk,
            organization__pk=organization_pk,
        )
        return self.organization_user
1046473
def get_user_if_exists(strategy, details, user=None, *args, **kwargs):
    """"""
    if user:
        return {'is_new': False}
    try:
        username = details.get('username')

        # Return the user if it exists
        return {
            'is_new': False,
            'user': User.objects.get(username=username)
        }
    except User.DoesNotExist:
        # Fall to the default return value
        pass

    # Nothing to return since we don't have a user
    return {}
39500
def get(self, user_id):
        """"""
        path = '/'.join(['person', user_id])
        return self.rachio.get(path)
565440
protected function getUser()
    {
        if ($this->_user === null) {
            $this->_user = $this->getClient()->user;
        }
        return $this->_user;
    }
915633
def get_object(self, queryset=None):
        
        user = super().get_object(queryset)
        profile, dummy = ForumProfile.objects.get_or_create(user=user)
        return profile
1058574
def get_user(self, user_id):
        
        user_model = get_user_model()
        try:
            return user_model.objects.get(id=user_id)
        except user_model.DoesNotExist:
            return None
370137
def get_user(self):
        """"""
        method = 'GET'
        endpoint = '/rest/v1/users/{}'.format(self.client.sauce_username)
        return self.client.request(method, endpoint)