/** * @see Form::save() */ public function save() { parent::save(); $invitedFriends = array(); foreach ($this->invitedMails as $email) { $invitation = InvitationEditor::create($email); $mail = new Mail(array($email => $email), WCF::getLanguage()->get('wcf.user.register.invitation.mail.subject', array('PAGE_TITLE' => WCF::getLanguage()->get(PAGE_TITLE))), WCF::getLanguage()->get('wcf.user.register.invitation.mail', array('PAGE_TITLE' => WCF::getLanguage()->get(PAGE_TITLE), 'PAGE_URL' => PAGE_URL, 'MAIL_ADMIN_ADDRESS' => MAIL_ADMIN_ADDRESS, '$username' => $invitation->senderUsername, '$invitationCode' => $invitation->code, '$email' => $invitation->email, '$emailUrlEncoded' => urlencode($invitation->email)))); $mail->send(); $invitedFriends[] = $invitation; } $this->saved(); $this->emails = ''; WCF::getTPL()->assign(array('success' => 'add', 'invitedFriends' => $invitedFriends)); }