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

Changeset 10119 for OpenPNE3/trunk/apps


Ignore:
Timestamp:
Jan 14, 2009, 12:07:16 AM (14 years ago)
Author:
ebihara
Message:

#3313:added ability to force registering one's mobile UID

Location:
OpenPNE3/trunk/apps
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/actions/actions.class.php

    r10003 r10119  
    5555    return sfView::SUCCESS;
    5656  }
     57
     58 /**
     59  * Executes registerMobileToRegisterEnd action
     60  *
     61  * @param sfRequest $request A request object
     62  */
     63  public function executeRegisterMobileToRegisterEnd(sfWebRequest $request)
     64  {
     65
     66    $id = $request->getParameter('id');
     67    $token = $request->getParameter('token');
     68
     69    $memberConfig = MemberConfigPeer::retrieveByNameAndMemberId('register_mobile_token', $id);
     70
     71    $this->forward404Unless($memberConfig && $token === $memberConfig->getValue());
     72
     73    opActivateBehavior::disable();
     74    $this->form = new sfOpenPNEPasswordForm(null, array('member' => $memberConfig->getMember()));
     75    opActivateBehavior::enable();
     76
     77    if ($request->isMethod(sfWebRequest::POST))
     78    {
     79      $this->form->bind($request->getParameter('password'));
     80      if ($this->form->isValid())
     81      {
     82        $memberConfig->getMember()->setConfig('mobile_uid', $request->getMobileUID());
     83
     84        $this->getUser()->setCurrentAuthMode($memberConfig->getMember()->getConfig('register_auth_mode'));
     85        $this->getUser()->setMemberId($id);
     86        $this->redirect($this->getUser()->getRegisterEndAction());
     87      }
     88    }
     89
     90    return sfView::SUCCESS;
     91  }
    5792}
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/config/security.yml

    r9742 r10119  
    88configComplete:
    99  is_secure: off
     10
     11registerMobileToRegisterEnd:
     12  is_secure: off
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/actions/actions.class.php

    r10003 r10119  
    144144    $this->redirect('member/configImage');
    145145  }
     146
     147 /**
     148  * Executes registerMobileToRegisterEnd action
     149  *
     150  * @param sfRequest $request A request object
     151  */
     152  public function executeRegisterMobileToRegisterEnd(sfWebRequest $request)
     153  {
     154    $this->form = new registerMobileForm($this->getUser()->getMember());
     155    if ($request->isMethod(sfWebRequest::POST))
     156    {
     157      $this->form->bind($request->getParameter('member_config'));
     158      if ($this->form->isValid())
     159      {
     160        $this->form->save();
     161        $this->redirect('member/registerMobileToRegisterEnd');
     162      }
     163    }
     164
     165    return sfView::SUCCESS;
     166  }
    146167}
  • OpenPNE3/trunk/apps/pc_frontend/modules/member/config/security.yml

    r9157 r10119  
    44
    55registerInput:
    6   credentials: SNSRegisterBegin
     6  credentials: [[SNSRegisterBegin, SNSRegisterFinish]]
    77
    88configComplete:
    99  is_secure: off
     10
     11registerMobileToRegisterEnd:
     12  credentials: SNSRegisterFinish
  • OpenPNE3/trunk/apps/pc_frontend/templates/_partsBox.php

    r10117 r10119  
    2020
    2121<?php if (isset($option['form'])) : ?>
     22<?php if (!empty($body)) : ?>
     23<div class="body">
     24<?php include_customizes($id, 'bodyTop') ?>
     25<?php echo $sf_data->getRaw('body') ?>
     26<?php include_customizes($id, 'bodyBottom') ?>
     27</div>
     28<?php endif; ?>
    2229<?php $option_raw = $sf_data->getRaw('option') ?>
    2330<form action="<?php echo url_for($option_raw['url']) ?>" method="post"<?php if (!empty($option['isMultipart'])) : ?> enctype="multipart/form-data"<?php endif; ?>>
Note: See TracChangeset for help on using the changeset viewer.