ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9159


Ignore:
Timestamp:
Nov 15, 2008, 1:28:40 AM (12 years ago)
Author:
ebihara
Message:

added support for InviteForm?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opAuthPCAddressPlugin/trunk/apps/pc_frontend/modules/pcAddress/actions/actions.class.php

    r9041 r9159  
    1313  public function executeRequestRegisterURL($request)
    1414  {
    15     $this->form = new PCAddressForm();
     15    $this->form = new InviteForm();
     16    if ($request->isMethod('post'))
     17    {
     18      $this->form->bind($request->getParameter('member_config'));
     19      if ($this->form->isValid())
     20      {
     21        $this->form->save();
    1622
    17     if ($request->isMethod('post')) {
    18       $params = $request->getParameter('pc_address');
    19       $this->form->bind($params);
    20 
    21       if ($this->form->isValid()) {
    22         $member = $this->getUser()->getAuthContainer()->registerEmailAddress($params['pc_address']);
    23         $token = MemberConfigPeer::retrieveByNameAndMemberId('pc_address_token', $member->getId());
    24 
    25         $subject = OpenPNEConfig::get('sns_name').'の招待状が届いています';
    26         $body = $this->getPartial('global/requestRegisterURLMail', array('token' => $token->getValue()));
    27         sfOpenPNEMailSend::execute($subject, $params['pc_address'], OpenPNEConfig::get('admin_mail_address'), $body);
     23        $mail = new sfOpenPNEMailSend();
     24        $mail->setSubject(OpenPNEConfig::get('sns_name').'の招待状が届いています');
     25        $mail->setTemplate('global/requestRegisterURLMail', array('token' => $this->form->getToken()));
     26        $mail->send($this->form->getMailAddress(), OpenPNEConfig::get('admin_mail_address'));
    2827
    2928        return sfView::SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.