[geeklog-hg] geeklog: Basic Yahoo OAuth login now working. Retrieves id and n...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Aug 28 22:25:22 EDT 2013


changeset 9270:464e4aeee113
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/464e4aeee113
user: Tom <websitemaster at cogeco.net>
date: Wed Aug 28 22:24:55 2013 -0400
description:
Basic Yahoo OAuth login now working. Retrieves id and name properly but still missing email, photo, etc..

diffstat:

 system/classes/oauthhelper.class.php |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r ca722f50d4ee -r 464e4aeee113 system/classes/oauthhelper.class.php
--- a/system/classes/oauthhelper.class.php	Wed Aug 28 21:39:02 2013 -0400
+++ b/system/classes/oauthhelper.class.php	Wed Aug 28 22:24:55 2013 -0400
@@ -330,15 +330,17 @@
                 break;
             case 'yahoo' :
                 $users = array(
-                    'loginname'      => (isset($info->first_name) ? $info->first_name : $info->id),
-                    'email'          => $info->emails->preferred,
+                    'loginname'      => (isset($info->query->results->profile->givenName) ? $info->query->results->profile->givenName : $info->query->results->profile->guid),
+                    'email'          => $info->query->results->profile->emails->handle,
                     'passwd'         => '',
                     'passwd2'        => '',
-                    'fullname'       => $info->name,
+                    // 'fullname'       => $info->query->results->profile->familyName,
+                    'fullname'       => $info->query->results->profile->nickname,
                     'homepage'       => '',
-                    'remoteusername' => DB_escapeString($info->id),
+                    'remoteusername' => DB_escapeString($info->query->results->profile->guid),
                     'remoteservice'  => 'oauth.yahoo',
-                    'remotephoto'    => 'https://apis.live.net/v5.0/me/picture?access_token='.$this->client->access_token,
+                    // 'remotephoto'    => 'https://apis.live.net/v5.0/me/picture?access_token='.$this->client->access_token,
+                    'remotephoto'    => '',
                 );
                 break;
             case 'linkedin' :



More information about the geeklog-cvs mailing list