Uses the get-all-user-accounts Portals API to retrieve the
        user-id by supplying an email.
760871
def get_user_id_from_email(self, email):
        
        accts = self.get_all_user_accounts()

        for acct in accts:
            if acct['email'] == email:
                return acct['id']
        return None
1169502
def getContactByUsername(cls, username):
        

        # Check if the User is linked already
        pc = api.portal.get_tool("portal_catalog")
        contacts = pc(portal_type=cls.portal_type,
                      getUsername=username)

        # No Contact assigned to this username
        if len(contacts) == 0:
            return None

        # Multiple Users assigned, this should never happen
        if len(contacts) > 1:
            logger.error("User '{}' is bound to multiple Contacts '{}'".format(
                username, ",".join(map(lambda c: c.Title, contacts))))
            return map(lambda x: x.getObject(), contacts)

        # Return the found Contact object
        return contacts[0].getObject()
958275
def require_user(wa, email):
    """"""
    cache_key = 'user-list'
    try:
        # Get the cached value
        data = userCache[cache_key]
    except KeyError:
        # If we hit a key error above, indicating that
        # we couldn't find the key, we'll simply re-request
        # the data
        data = wa.users.loadUsers()
        userCache[cache_key] = data

    return AssertUser([x for x in data if x.username == email])
39110
def getContactUIDForUser(self):
        
        mt = getToolByName(self, 'portal_membership')
        user = mt.getAuthenticatedMember()
        user_id = user.getUserName()
        pc = getToolByName(self, 'portal_catalog')
        r = pc(portal_type='Contact',
               getUsername=user_id)
        if len(r) == 1:
            return r[0].UID
1117411
def GetUsers(alias=None):
		
		if alias is None:  alias = clc.v1.Account.GetAlias()
		r = clc.v1.API.Call('post','User/GetUsers',{'AccountAlias': alias})
		if int(r['StatusCode']) == 0:  
			return(r['Users'])
107164
def getUser(self):
        
        username = self.getUsername()
        if not username:
            return None
        user = api.user.get(userid=username)
        return user
705505
def get_user(self, id, **data):
        
        
        return self.get("/users/{0}/".format(id), data=data)
312830
public static WikiUser getUser(String wikiId, String siteurl) {

    WikiUser result = null;
    try {
      Properties props = getProperties(wikiId);
      result = new WikiUser();
      result.setUsername(props.getProperty("user"));
      result.setEmail(props.getProperty("email"));
      Crypt pcf = new Crypt(props.getProperty("cypher"),
          props.getProperty("salt"));
      result.setPassword(pcf.decrypt(props.getProperty("secret")));
    } catch (FileNotFoundException e) {
      String msg = help(wikiId, siteurl);
      LOGGER.log(Level.SEVERE, msg);
    } catch (IOException e) {
      LOGGER.log(Level.SEVERE, e.getMessage());
    } catch (GeneralSecurityException e) {
      LOGGER.log(Level.SEVERE, e.getMessage());
    }
    return result;
  }
322092
def getContactUIDForUser(self):
        
        user = self.REQUEST.AUTHENTICATED_USER
        user_id = user.getUserName()
        r = self.portal_catalog(
            portal_type='Contact',
            getUsername=user_id
        )
        if len(r) == 1:
            return r[0].UID
1048207
def get_user(self, username="", ext_collections=False, ext_galleries=False):

        

        if not username and self.standard_grant_type == "authorization_code":
            response = self._req('/user/whoami')
            u = User()
            u.from_dict(response)
        else:
            if not username:
                raise DeviantartError("No username defined.")
            else:
                response = self._req('/user/profile/{}'.format(username), {
                    'ext_collections' : ext_collections,
                    'ext_galleries' : ext_galleries
                })
                u = User()
                u.from_dict(response['user'])

        return u
131745
def get_user(id, opts = {})
      data, _status_code, _headers = get_user_with_http_info(id, opts)
      return data
    end
92802
def fetchAllUsers(self, rawResults = False) :
        """"""
        r = self.connection.session.get(self.URL)
        if r.status_code == 200 :
            data = r.json()
            if rawResults :
                return data["result"]
            else :
                res = []
                for resu in data["result"] :
                    u = User(self, resu)
                    res.append(u)
                return res
        else :
            raise ConnectionError("Unable to get user list", r.url, r.status_code)
732792
def get_user_permission_from_email(self, email):
        
        _id = self.get_user_id_from_email(email)
        return self.get_user_permission(_id)
1086942
def get_user(self, key = None):
		'''
		''' 	
		if key:
			uri = self.api_uri + "/users/" + key
		else:
			uri = self.api_uri + "/users/me"

		return self._req('get', uri)
369539
def process_user(ctx, param, value):
    """"""
    if value:
        if value.isdigit():
            user = User.query.get(str(value))
        else:
            user = User.query.filter(User.email == value).one_or_none()
        return user
781524
def get_user_by_email(server_context, email):
    
    url = server_context.build_url(user_controller, 'getUsers.api')
    payload = dict(includeDeactivatedAccounts=True)
    result = server_context.make_request(url, payload)

    if result is None or result['users'] is None:
        raise ValueError("No Users in container" + email)

    for user in result['users']:
        if user['email'] == email:
            return user
    else:
        raise ValueError("User not found: " + email)
391874
def get_email(self, email_id):
        
        connection = Connection(self.token)

        connection.set_url(self.production, self.EMAILS_ID_URL % email_id)

        return connection.get_request()