Changeset 21320
- Timestamp:
- 08/22/09 01:02:32 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/ysfOpenPlugin/trunk/lib/validator/OpenIdentityValidator.class.php
r20251 r21320 19 19 { 20 20 21 if(stristr($value, ' ymail.com') || stristr($value, 'yahoo.com')) // yahoo email = yahoo open id21 if(stristr($value, '@ymail.com') || stristr($value, '@yahoo.com')) 22 22 { 23 $value = 'https:// me.yahoo.com';23 $value = 'https://open.login.yahooapis.com/openid/op/auth'; 24 24 } 25 else if(stristr($value, ' gmail.com') || stristr($value, 'google.com')) // google email = google open id25 else if(stristr($value, '@gmail.com') || stristr($value, '@google.com')) 26 26 { 27 27 $value = 'https://www.google.com/accounts/o8/id'; plugins/ysfOpenPlugin/trunk/modules/ysfOpenPlugin/actions/actions.class.php
r20251 r21320 20 20 { 21 21 $oauthAccessToken = $this->getUser()->getAttribute('yahoo_oauth_access_token'); 22 $yahoo = $this->getUser()-> getOAuthClient('yahoo');22 $yahoo = $this->getUser()->hasOAuthClient('yahoo') && $this->getUser()->getOAuthClient('yahoo')->hasAccessToken(); 23 23 24 24 if($yahoo) … … 57 57 58 58 $consumer = new Zend_OpenId_Consumer(new Zend_OpenId_Consumer_Storage_File(sfConfig::get('sf_cache_dir') . '/openid/')); 59 $profile = new Zend_OpenId_Extension_Sreg(array('nickname' => true, 'fullname' => false, 'email' => true, 'dob' => false, 'gender' => false, 'postcode' => false, 'language' => false, 'timezone' => false), null, '1.1'); 59 $profile = new Zend_OpenId_Extension_Sreg(array('nickname' => true, 'fullname' => false, 'email' => true, 'dob' => false, 'gender' => false, 'postcode' => false, 'language' => false, 'timezone' => false), null, '1.1'); 60 // $oauth = new Zend_OpenID_Extension_Oauth(); 60 61 61 62 $openIdMode = $request->getParameter('openid_mode'); plugins/ysfOpenPlugin/trunk/modules/ysfOpenPlugin/templates/loginSuccess.php
r20251 r21320 23 23 24 24 <div class="yui-b"> 25 <a href="<?php echo url_for('ysfOpenPlugin/login'); ?>?_csrf_token=<?php echo $form->getCSRFToken(); ?>&identity=https://me.yahoo.com " title="<?php echo __('Yahoo! OpenID'); ?>">25 <a href="<?php echo url_for('ysfOpenPlugin/login'); ?>?_csrf_token=<?php echo $form->getCSRFToken(); ?>&identity=https://me.yahoo.com/" title="<?php echo __('Yahoo! OpenID'); ?>"> 26 26 <img src="http://www.yahoo.com/favicon.ico" alt="<?php echo __('Yahoo! OpenID'); ?>" height="16" width="16" /> 27 27 <?php echo __('Sign in with Yahoo! ID'); ?>