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

Changeset 12322


Ignore:
Timestamp:
Jul 20, 2009, 4:58:09 PM (14 years ago)
Author:
ebihara
Message:

#4136:fixed the registration process that doesn't allow a disabled member to begin registeration again

Location:
OpenPNE3/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/apps/mobile_frontend/modules/member/config/security.yml

    r10119 r12322  
    44
    55registerInput:
    6   credentials: SNSRegisterBegin
     6  credentials: [[SNSRegisterBegin, SNSRegisterFinish]]
    77
    88configComplete:
  • OpenPNE3/trunk/apps/mobile_frontend/templates/layout.php

    r12314 r12322  
    5151
    5252<?php if (!include_slot('op_mobile_footer')): ?>
     53<?php if ($sf_user->hasCredential('SNSMember')): ?>
    5354<table width="100%">
    5455<tbody><tr><td align="center" bgcolor="<?php echo $op_color["core_color_11"] ?>">
     
    5657</td></tr></tbody></table>
    5758<?php endif; ?>
     59<?php endif; ?>
    5860</body>
    5961</html>
  • OpenPNE3/trunk/lib/form/doctrine/InviteForm.class.php

    r11936 r12322  
    5757    }
    5858
    59     if (!empty($values['mobile_address']) && Doctrine::getTable('MemberConfig')->retrieveByNameAndValue('mobile_address', $values['mobile_address']))
     59    if (!empty($values['mobile_address']) && !$this->validateAddress('mobile_address', $values['mobile_address']))
    6060    {
    6161      throw new sfValidatorError($validator, 'invalid');
    6262    }
    63     if (!empty($values['pc_address']) && Doctrine::getTable('MemberConfig')->retrieveByNameAndValue('pc_address', $values['pc_address']))
     63    if (!empty($values['pc_address']) && !$this->validateAddress('pc_address', $values['pc_address']))
    6464    {
    6565      throw new sfValidatorError($validator, 'invalid');
     
    6767
    6868    return $values;
     69  }
     70
     71  protected function validateAddress($configName, $configValue)
     72  {
     73    $activation = opActivateBehavior::getEnabled();
     74    opActivateBehavior::disable();
     75
     76    if ($config = Doctrine::getTable('MemberConfig')->retrieveByNameAndValue($configName, $configValue))
     77    {
     78      if ($config->getMember()->getIsActive() || !$config->getMember()->getConfig($configName.'_token'))
     79      {
     80        if ($activation)
     81        {
     82          opActivateBehavior::enable();
     83        }
     84        return false;
     85      }
     86
     87      $this->member = $config->getMember();
     88    }
     89    elseif ($config = Doctrine::getTable('MemberConfig')->retrieveByNameAndValue($configName.'_pre', $configValue))
     90    {
     91      $this->member = $config->getMember();
     92    }
     93
     94    if ($activation)
     95    {
     96      opActivateBehavior::enable();
     97    }
     98    return true;
    6999  }
    70100
  • OpenPNE3/trunk/lib/form/opAuthRegisterForm.class.php

    r12233 r12322  
    4747
    4848    $this->memberForm = new MemberForm($this->getMember());
    49     $this->profileForm = new MemberProfileForm($this->getMember()->getMemberProfile());
     49    $this->profileForm = new MemberProfileForm($this->getMember()->getProfiles());
    5050    $this->profileForm->setRegisterWidgets();
    5151    $this->configForm = new MemberConfigForm($this->getMember());
  • OpenPNE3/trunk/lib/user/sfOpenPNESecurityUser.class.php

    r12234 r12322  
    172172    {
    173173      $this->setMemberId($memberId);
     174      if (!$this->getMember())
     175      {
     176        return false;
     177      }
    174178
    175179      if ($this->getMember()->isOnBlacklist())
Note: See TracChangeset for help on using the changeset viewer.