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

Changeset 9779


Ignore:
Timestamp:
Dec 29, 2008, 11:54:32 PM (14 years ago)
Author:
ebihara
Message:

#3260:fixed an user tries login and redirects to @homepage when the user has accessed to a login required action and has forwarded to login action

Location:
OpenPNE3/trunk/lib
Files:
2 added
4 edited

Legend:

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

    r9767 r9779  
    3535    if ($request->hasParameter('authMode'))
    3636    {
    37       if ($this->getUser()->login())
     37      if ($uri = $this->getUser()->login())
    3838      {
    3939        $this->redirectIf($this->getUser()->hasCredential('SNSRegisterBegin'), 'member/registerInput');
    4040        $this->redirectIf($this->getUser()->hasCredential('SNSRegisterFinish'), $this->getUser()->getRegisterEndAction());
    41         $this->redirectIf($this->getUser()->hasCredential('SNSMember'), 'member/home');
     41        $this->redirectIf($this->getUser()->hasCredential('SNSMember'), $uri);
    4242      }
    4343      return sfView::ERROR;
  • OpenPNE3/trunk/lib/form/opAuthLoginForm.class.php

    r9727 r9779  
    3131    parent::__construct($defaults, $options, $CSRFSecret);
    3232
     33    $this->setWidget('next_uri', new opWidgetFormInputHiddenNextUri());
     34    $this->setValidator('next_uri', new opValidatorNextUri());
     35
    3336    $this->widgetSchema->setNameFormat('auth'.$this->adapter->getAuthModeName().'[%s]');
    3437  }
  • OpenPNE3/trunk/lib/form/sfOpenPNEAuthForm.class.php

    r9677 r9779  
    3535
    3636    parent::__construct($defaults, $options, $CSRFSecret);
     37
     38    $this->setWidget('next_uri', new opWidgetFormInputHiddenNextUri());
     39    $this->setValidator('next_uri', new opValidatorNextUri());
    3740  }
    3841
     
    99102  public function setForRegisterWidgets($member = null)
    100103  {
    101     if (!$member) {
     104    unset($this['next_uri']);
     105
     106    if (!$member)
     107    {
    102108      $member = new Member();
    103109    }
  • OpenPNE3/trunk/lib/user/sfOpenPNESecurityUser.class.php

    r9777 r9779  
    110110    $this->initializeCredentials();
    111111
    112     return $this->isAuthenticated();
     112    if ($this->isAuthenticated())
     113    {
     114      $uri = $this->getAuthAdapter()->getAuthForm()->getValue('next_uri');
     115      return $uri;
     116    }
     117
     118    return false;
    113119  }
    114120
Note: See TracChangeset for help on using the changeset viewer.