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

Changeset 12741


Ignore:
Timestamp:
Aug 24, 2009, 4:14:05 AM (10 years ago)
Author:
ebihara
Message:

#3943:added ability to store member_id when oauth authorizing using member access token

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/filter/opCheckOAuthAccessTokenFilter.class.php

    r12640 r12741  
    4141        sfContext::getInstance()->getUser()->addCredentials($information->getUsingApis());
    4242      }
     43
     44      $tokenType = $this->context->getRequest()->getParameter('token_type', 'member');
     45      if ('member' === $tokenType)
     46      {
     47        $accessToken = Doctrine::getTable('OAuthMemberToken')->findByKeyString($token->key, 'access');
     48        sfContext::getInstance()->getUser()->setAttribute('member_id', $accessToken->getMember()->id);
     49      }
    4350    }
    4451
Note: See TracChangeset for help on using the changeset viewer.