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

Changeset 9633


Ignore:
Timestamp:
Dec 22, 2008, 10:34:05 PM (11 years ago)
Author:
ebihara
Message:

#3221:changed treat the SNSRegisterBegin credential of the authentication system. This change is for authentication method registers a member on login process that is like OpenID

Location:
OpenPNE3/trunk/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/action/sfOpenPNEMemberAction.class.php

    r9631 r9633  
    3939      if ($authForm->isValid())
    4040      {
    41         $this->redirectIf($this->getUser()->login($authForm), 'member/home');
     41        $this->getUser()->login($authForm);
     42
     43        $this->redirectIf($this->getUser()->hasCredential('SNSRegisterBegin'), 'member/registerInput');
     44        $this->redirectIf($this->getUser()->hasCredential('SNSRegisterFinish'), $this->getUser()->getRegisterEndAction());
     45        $this->redirectIf($this->getUser()->hasCredential('SNSMember'), 'member/home');
    4246      }
    4347      return sfView::ERROR;
  • OpenPNE3/trunk/lib/form/MemberConfigForm.class.php

    r9157 r9633  
    109109    foreach ($this->getValues() as $key => $value)
    110110    {
    111       if ($this->memberConfigSettings[$key]['IsUnique'])
     111      if (!empty($this->memberConfigSettings[$key]['IsUnique']))
    112112      {
    113113        $memberConfig = MemberConfigPeer::retrieveByNameAndValue($key.'_pre', $value);
  • OpenPNE3/trunk/lib/model/MemberPeer.php

    r7811 r9633  
    1010class MemberPeer extends BaseMemberPeer
    1111{
     12  public static function createPre()
     13  {
     14    $member = new Member();
     15    $member->setIsActive(false);
     16    $member->save();
     17
     18    return $member;
     19  }
    1220}
  • OpenPNE3/trunk/lib/user/sfOpenPNEAuthContainer.class.php

    r8705 r9633  
    1010abstract class sfOpenPNEAuthContainer
    1111{
    12   protected $authModuleName = '';
     12  protected
     13    $authModuleName = '';
    1314
    1415  public function __construct()
  • OpenPNE3/trunk/lib/user/sfOpenPNESecurityUser.class.php

    r8757 r9633  
    109109    $member_id = $this->getAuthContainer()->fetchData($form);
    110110
    111     if ($member_id) {
    112       $this->setAuthenticated(true);
    113       $this->setIsSNSMember(true);
     111    if ($member_id)
     112    {
    114113      $this->setMemberId($member_id);
    115     }
     114      $this->setAuthenticated(true);
     115    }
     116
     117    $this->initializeCredentials();
    116118
    117119    return $this->isAuthenticated();
     
    153155    $memberId = $this->getMemberId();
    154156    $isRegisterFinish = $this->getAuthContainer()->isRegisterFinish($memberId);
     157    $isRegisterBegin = $this->getAuthContainer()->isRegisterBegin($memberId);
    155158
    156159    $this->setIsSNSMember(false);
    157160    $this->setIsSNSRegisterFinish(false);
    158161
    159     if ($memberId && $isRegisterFinish) {
     162    if ($memberId && $isRegisterFinish)
     163    {
    160164      $this->setIsSNSRegisterFinish(true);
    161     } elseif ($memberId) {
     165    }
     166    elseif ($isRegisterBegin)
     167    {
     168      $this->setIsSNSRegisterBegin(true);
     169    }
     170    elseif ($memberId)
     171    {
    162172      $this->setIsSNSMember(true);
    163173    }
    164 
    165     $this->setIsSNSRegisterBegin($this->getAuthContainer()->isRegisterBegin($memberId));
    166174  }
    167175
Note: See TracChangeset for help on using the changeset viewer.