Returns user identifier for given replier export strategy

@param replierExportStrategy replier export strategy
@param queryReply reply
@return user identifier
776901
private static String getReplierExportStrategyValue(ReplierExportStrategy replierExportStrategy, QueryReply queryReply) {
    if (queryReply != null) {
      User user = queryReply.getUser();
      if (user != null) {
        switch (replierExportStrategy) {
          case NONE:
          break;
          case HASH:
            return RequestUtils.md5EncodeString(String.valueOf(user.getId()));
          case NAME:
            return user.getFullName(true, false);
          case EMAIL:
            return user.getDefaultEmailAsString();
        }
      }
    }
    
    return "-";
  }
590396
public DruidQuerySignature asAggregateSignature(RowSignature sourceSignature)
  {
    return new DruidQuerySignature(
        sourceSignature,
        virtualColumnPrefix,
        virtualColumnsByExpression,
        virtualColumnsByName,
        true
    );
  }
680455
def verifyAccount(self, subject, vendorSpecific=None):
        
        response = self.verifyAccountResponse(subject, vendorSpecific)
        return self._read_boolean_response(response)
493420
protected RestletUtilUser buildRestletUserFromSparqlResult(final String userIdentifier, final BindingSet bindingSet)
    {
        // log.info("result={}", bindingSet);
        
        String userEmail = bindingSet.getValue("userEmail").stringValue();
        // TODO: When hashed, need to unhash here
        char[] userSecret = null;
        if(bindingSet.hasBinding("userSecret"))
        {
            userSecret = bindingSet.getValue("userSecret").stringValue().toCharArray();
        }
        String userFirstName = null;
        if(bindingSet.hasBinding("userFirstName"))
        {
            userFirstName = bindingSet.getValue("userFirstName").stringValue();
        }
        String userLastName = null;
        if(bindingSet.hasBinding("userLastName"))
        {
            userLastName = bindingSet.getValue("userLastName").stringValue();
        }
        
        return new RestletUtilUser(userIdentifier, userSecret, userFirstName, userLastName, userEmail);
    }
817689
def mapIdentity(self, primarySubject, secondarySubject, vendorSpecific=None):
        
        response = self.mapIdentityResponse(
            primarySubject, secondarySubject, vendorSpecific
        )
        return self._read_boolean_response(response)
50823
@Override
  public final OnlineBuyer getAuthBuyr(final Map<String, Object> pRqVs,
    final IRequestData pRqDt) throws Exception {
    String buyerIdStr = pRqDt.getCookieValue("cBuyerId");
    if (buyerIdStr == null) {
      this.spamHnd.handle(pRqVs, pRqDt, 1, "Buyer. has no cBuyerId!");
      return null;
    }
    Long buyerId = Long.valueOf(buyerIdStr);
    OnlineBuyer buyer = getSrvOrm().retrieveEntityById(pRqVs,
      OnlineBuyer.class, buyerId);
    if (buyer == null) {
      this.spamHnd.handle(pRqVs, pRqDt, 1, "Buyer. DB has no cBuyerId: "
        + buyerIdStr);
      return null;
    }
    if (buyer.getRegEmail() == null || buyer.getBuSeId() == null) {
      this.spamHnd.handle(pRqVs, pRqDt, 1, "Buyer. Unauthorized cBuyerId: "
        + buyerIdStr);
      return null;
    }
    String buSeId = pRqDt.getCookieValue("buSeId");
    if (!buyer.getBuSeId().equals(buSeId)) {
      this.spamHnd.handle(pRqVs, pRqDt, 1000,
        "Buyer. Authorized invasion cBuyerId: " + buyerIdStr);
      return null;
    }
    long now = new Date().getTime();
    if (now - buyer.getLsTm() > 1800000L) {
      this.spamHnd.handle(pRqVs, pRqDt, 0,
        "Buyer. Authorized exceed cBuyerId/ms: " + buyerIdStr + "/"
          + (now - buyer.getLsTm()));
      return null;
    }
    buyer.setLsTm(now);
    String[] fieldsNames = new String[] {"itsId", "itsVersion", "lsTm"};
    pRqVs.put("fieldsNames", fieldsNames);
    buyer.setLsTm(now);
    this.srvOrm.updateEntity(pRqVs, buyer);
    pRqVs.remove("fieldsNames");
    pRqDt.setAttribute("buyr", buyer);
    return buyer;
  }
111996
public SIBUuid8 getReplyingMeUuid() {
    byte[] b = (byte[])jmo.getField(TrmFirstContactAccess.BODY_MECONNECTREPLY_REPLYINGMEUUID);
    if (b != null)
      return new SIBUuid8(b);
    return null;
  }
809773
@RequestMapping(path = "/{customerId}", method=RequestMethod.GET)
    public ResponseEntity<Customer> getCustomer(@PathVariable("customerId") Long customerId, @RequestParam(required=true) String name){
        Customer customer = customerService.getCustomer(customerId);
        if(customer != null){
            return new ResponseEntity<Customer>(customer, HttpStatus.OK);
        }
        return new ResponseEntity<Customer>(HttpStatus.NOT_FOUND);
    }
758294
public function findReceivedByObjectOrSender(
        User $receiver,
        $objectOrSenderUsernameSearch,
        $executeQuery = true
    )
    {
        $dql = "
            SELECT um, m, u
            FROM Claroline\MessageBundle\Entity\UserMessage um
            JOIN um.user u
            JOIN um.message m
            WHERE u.id = {$receiver->getId()}
            AND um.isRemoved = false
            AND um.isSent = false
            AND (
                UPPER(m.object) LIKE :search
                OR UPPER(m.senderUsername) LIKE :search
            )
            ORDER BY m.date DESC
        ";
        $query = $this->_em->createQuery($dql);
        $searchParameter = '%' . strtoupper($objectOrSenderUsernameSearch) . '%';
        $query->setParameter('search', $searchParameter);

        return $executeQuery ? $query->getResult() : $query;
    }
711735
@Override
  public final OnlineBuyer getBuyr(final Map<String, Object> pRqVs,
    final IRequestData pRqDt) throws Exception {
    Long buyerId = null;
    String buyerIdStr = pRqDt.getCookieValue("cBuyerId");
    if (buyerIdStr != null && buyerIdStr.length() > 0) {
       buyerId = Long.valueOf(buyerIdStr);
    }
    OnlineBuyer buyer = null;
    if (buyerId != null) {
      buyer = getSrvOrm().retrieveEntityById(pRqVs, OnlineBuyer.class, buyerId);
    }
    if (buyer != null && buyer.getRegEmail() != null
      && buyer.getBuSeId() != null) {
      String buSeId = pRqDt.getCookieValue("buSeId");
      if (!buyer.getBuSeId().equals(buSeId)) {
        this.spamHnd.handle(pRqVs, pRqDt, 100,
          "Buyer. Authorized invasion? cBuyerId: " + buyerIdStr);
        //buyer also might clears cookie, so it's need new authorization
        //new/free buyer will be used till authorization:
        buyer = null;
      }
    }
    return buyer;
  }
1328119
protected function getExistingIdentity( UserResponseInterface $response )
    {
        $repo = $this->om->getRepository( $this->userIdentityClass );   // wrong class
        return $repo->findOneBy( array(
            'identifier' => $response->getUsername(),
            'type' => $response->getResourceOwner()->getName(),
        ));
    }
91098
private IAuthorizationPrincipal getAuthorizationPrincipal(HttpServletRequest req) {
        IPerson user = personManager.getPerson(req);
        EntityIdentifier ei = user.getEntityIdentifier();
        IAuthorizationPrincipal rslt =
                AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
        return rslt;
    }
936058
public RepositoryDTO getOrFindUserRepository(String user, String repositoryName, GitRepoClient repoClient) {
        RepositoryDTO repository = getUserRepository(user, repositoryName);
        if (repository == null) {
            List<RepositoryDTO> repositoryDTOs = repoClient.listRepositories();
            updateUserRepositories(repositoryDTOs);
            repository = getUserRepository(user, repositoryName);
        }
        return repository;
    }
1340016
public RemoteTransaction getOrCreateRemoteTransaction(GlobalTransaction globalTx, WriteCommand[] modifications) {
      return getOrCreateRemoteTransaction(globalTx, modifications, currentTopologyId);
   }
373671
@Override
    public synchronized UserTransaction getUserTransaction() {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "getUserTransaction");

        // Calling getUserTransaction is not allowed from setMessageDrivenContext
        // per the EJB Specification.                                      d159152
        if ((state == PRE_CREATE)) {
            IllegalStateException ise;

            ise = new IllegalStateException("MessageDrivenBean: getUserTransaction " +
                                            "not allowed from state = " +
                                            getStateName(state));
            if (isTraceOn && tc.isDebugEnabled())
                Tr.exit(tc, "getUserTransaction", ise);

            throw ise;
        }

        UserTransaction userTransactionWrapper = UserTransactionWrapper.INSTANCE; // d631349

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "getUserTransaction", userTransactionWrapper);
        return userTransactionWrapper;
    }
275671
public String getAuthorizationUrl(final String relyingPartyIdentifier, final String wctx) {
        return String.format(getIdentityProviderUrl() + QUERYSTRING, relyingPartyIdentifier, wctx);
    }
818873
function verifyUsernameDoesNotExist(req, res, next) {
  var username = req.body.username;
  var dataStore = req.app.dataStore;

  // Check for an existing employee REST resource - /employees/{username}
  var resource = new swagger.Resource('/employees', username, null);
  dataStore.get(resource, function(err, resource) {
    if (resource) {
      // The username already exists, so send an HTTP 409 (Conflict)
      res.sendStatus(409);
    }
    else {
      next();
    }
  });
}