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

Changeset 9910


Ignore:
Timestamp:
Jan 5, 2009, 4:30:06 PM (14 years ago)
Author:
ebihara
Message:

#3224:opAuthAdapter::registerData() is now deprecated method and the child class doesn't have to define this method. And added opAuthRegisterForm::save() and opAuthRegisterForm::doSave() methods plays a role like the deprecated method.

Location:
OpenPNE3/trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/form/opAuthRegisterForm.class.php

    r9710 r9910  
    9595  }
    9696
     97  public function save()
     98  {
     99    $member = $this->memberForm->save();
     100    $this->setMember($member);
     101
     102    $profile = $this->profileForm->save($this->getMember()->getId());
     103    $config = $this->configForm->save($this->getMember()->getId());
     104    $auth = $this->doSave();
     105
     106    if ($member && $profile && $auth && $config)
     107    {
     108      return $this->getMember()->getId();
     109    }
     110
     111    return false;
     112  }
     113
     114  public function doSave()
     115  {
     116    return true;
     117  }
     118
    97119 /**
    98120  * Returns true if the form is valid.
  • OpenPNE3/trunk/lib/user/opAuthAdapter.class.php

    r9906 r9910  
    242242   * Registers data to storage container.
    243243   *
     244   * @deprecated
     245   *
    244246   * @param  int    $memberId
    245247   * @param  sfForm $form
     248   *
    246249   * @return bool   true if the data has already been saved, false otherwise
    247250   */
    248   abstract public function registerData($memberId, $form);
     251  public function registerData($memberId, $form)
     252  {
     253  }
    249254
    250255 /**
     
    256261  public function register($form)
    257262  {
     263    if ($form instanceof opAuthRegisterForm)
     264    {
     265      return $form->save();
     266    }
     267
    258268    $member = true;
    259269    $profile = true;
Note: See TracChangeset for help on using the changeset viewer.