コード例 #1
0
ファイル: PlayerBOImpl.java プロジェクト: azhur/PingPong
  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;
  }
コード例 #2
0
ファイル: PlayerBOImpl.java プロジェクト: azhur/PingPong
  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...");
  }