Ejemplo n.º 1
0
  private PlayerAccount createAccount(PlayerRegistrationData registrationData, Player player) {
    final PlayerAccount account = new PlayerAccount();
    account.setPlayer(player);
    account.setEmail(registrationData.getEmail());
    account.setEnabled(true);
    account.setPassword(registrationData.getPassword());

    accountBO.encodePassword(account);

    playerAccountDAO.insert(account);

    return account;
  }
Ejemplo n.º 2
0
  private void notifyOfActivation(final Player player) {
    final PlayerAccount account = playerAccountDAO.getByPlayer(player.getId());

    final String toAddress = account.getEmail();
    final String subject = "Player activation";

    mailer.sendEmail(
        Mailer.EmailTemplate.PLAYER_ACTIVATION,
        new HashMap<String, Object>() {
          {
            put("playerName", player.getName());
            put("url", urlResolver.getPortalUrl());
          }
        },
        toAddress,
        subject,
        null,
        null,
        false);

    LOG.info("Sending email about player activation...");
  }