/** * <p> * Return the EPerson corresponding to token, where token was emailed to the * person by either the sendRegistrationInfo or sendForgotPasswordInfo * methods. * </p> * * <p> * If the token is not found return null. * </p> * * @param context DSpace context * @param token Account token * @return The EPerson corresponding to token, or null. * @throws SQLException If the token or eperson cannot be retrieved from the * database. */ @Override public EPerson getEPerson(Context context, String token) throws SQLException, AuthorizeException { String email = getEmail(context, token); if (email == null) { return null; } return ePersonService.findByEmail(context, email); }
EPerson eperson = ePersonService.findByEmail(context, email); System.out.println("Harvest started... "); context.setCurrentUser(eperson);
EPerson person = ePersonService.findByEmail(context, email); checkSelectCollectionForUser(person); peopleChecked++;
eperson = ePersonService.findByNetid(context, command.getOptionValue(OPT_NETID.getOpt())); } else if (command.hasOption(OPT_EMAIL.getOpt())) { eperson = ePersonService.findByEmail(context, command.getOptionValue(OPT_EMAIL.getOpt())); } else { System.err.println("You must specify the user's email address or netid.");
/** * Set EPerson doing import * * @param context DSpace Context * @param eperson EPerson obj * @throws Exception if error */ protected void setEPerson(Context context, String eperson) throws Exception { if (eperson == null) { pr("Error - an eperson to do the importing must be specified"); pr(" (run with -h flag for details)"); throw new Exception("EPerson not specified."); } EPerson myEPerson = null; if (eperson.indexOf('@') != -1) { // @ sign, must be an email myEPerson = epersonService.findByEmail(context, eperson); } else { myEPerson = epersonService.find(context, UUID.fromString(eperson)); } if (myEPerson == null) { pr("Error, eperson cannot be found: " + eperson); throw new Exception("Invalid EPerson"); } context.setCurrentUser(myEPerson); }
eperson = ePersonService.findByNetid(context, command.getOptionValue(OPT_NETID.getOpt())); } else if (command.hasOption(OPT_EMAIL.getOpt())) { eperson = ePersonService.findByEmail(context, command.getOptionValue(OPT_EMAIL.getOpt())); } else { System.err.println("No EPerson selected");
EPerson siteEp = ePersonService.findByEmail(c, configurationService.getProperty("mail.admin")); if (siteEp != null) { EPerson ep = ePersonService.findByEmail(c, contact); if (ep != null) { epList.add(ep);
myEPerson = ePersonService.findByEmail(context, eperson); } else { myEPerson = ePersonService.find(context, UUID.fromString(eperson));
foundEmail = true; email = email.toLowerCase(); eperson = ePersonService.findByEmail(context, email); foundRemoteUser = true; email = email.toLowerCase(); eperson = ePersonService.findByEmail(context, email);
eperson = ePersonService.findByEmail(context, username.toLowerCase());
public HarvestScheduler() throws SQLException, AuthorizeException { mainContext = new Context(); String harvestAdminParam = ConfigurationManager.getProperty("oai", "harvester.eperson"); harvestAdmin = null; if (harvestAdminParam != null && harvestAdminParam.length() > 0) { harvestAdmin = EPersonServiceFactory.getInstance().getEPersonService() .findByEmail(mainContext, harvestAdminParam); } harvestThreads = new Stack<HarvestThread>(); maxActiveThreads = ConfigurationManager.getIntProperty("oai", "harvester.maxThreads"); if (maxActiveThreads == 0) { maxActiveThreads = 3; } minHeartbeat = ConfigurationManager.getIntProperty("oai", "harvester.minHeartbeat") * 1000; if (minHeartbeat == 0) { minHeartbeat = 30000; } maxHeartbeat = ConfigurationManager.getIntProperty("oai", "harvester.maxHeartbeat") * 1000; if (maxHeartbeat == 0) { maxHeartbeat = 3600000; } }
EPerson dbEPerson = epersonService.findByEmail(context, ePerson.getEmail());
EPersonServiceFactory.getInstance().getEPersonService().findByEmail(context, authentication.getName()));
/** * Return a RequestItemAuthor object for the specified helpdesk email address. * It makes an attempt to find if there is a matching eperson for the helpdesk address, to use the name, * Otherwise it falls back to a helpdeskname key in the Messages.props. * * @param context context * @param helpDeskEmail email * @return RequestItemAuthor * @throws SQLException if database error */ public RequestItemAuthor getHelpDeskPerson(Context context, String helpDeskEmail) throws SQLException { EPerson helpdeskEPerson = null; context.turnOffAuthorisationSystem(); helpdeskEPerson = ePersonService.findByEmail(context, helpDeskEmail); context.restoreAuthSystemState(); if (helpdeskEPerson != null) { return new RequestItemAuthor(helpdeskEPerson); } else { String helpdeskName = I18nUtil.getMessage( "org.dspace.app.requestitem.RequestItemHelpdeskStrategy.helpdeskname", context); return new RequestItemAuthor(helpdeskName, helpDeskEmail); } } }
log.info(LogManager.getHeader(context, "authenticate", "attempting password auth of user=" + username)); eperson = EPersonServiceFactory.getInstance().getEPersonService() .findByEmail(context, username.toLowerCase());
EPerson eperson = ePersonService.findByEmail(context, email); context.setCurrentUser(eperson); context.turnOffAuthorisationSystem();
EPerson eperson = null; if (email != null) { eperson = ePersonService.findByEmail(context, email);
EPerson eperson = ePersonService.findByEmail(context, email);
epObo = ePersonService.findByEmail(context, obo); if (epObo == null) { epObo = ePersonService.findByNetid(context, obo);
epObo = ePersonService.findByEmail(context, obo); if (epObo == null) { epObo = ePersonService.findByNetid(context, obo);