Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
fe46caf7
Commit
fe46caf7
authored
Jul 11, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User attributes fetching at `VKontakte` adjusted
parent
9eec6191
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
VKontakte.php
extensions/authclient/clients/VKontakte.php
+14
-3
No files found.
extensions/authclient/clients/VKontakte.php
View file @
fe46caf7
...
@@ -12,7 +12,8 @@ use yii\authclient\OAuth2;
...
@@ -12,7 +12,8 @@ use yii\authclient\OAuth2;
/**
/**
* VKontakte allows authentication via VKontakte OAuth.
* VKontakte allows authentication via VKontakte OAuth.
*
*
* In order to use VKontakte OAuth you must register your application at <http://vk.com/apps.php?act=add&site=1>.
* In order to use VKontakte OAuth you must register your application at <http://vk.com/editapp?act=create>.
*
*
*
* Example application configuration:
* Example application configuration:
*
*
...
@@ -32,7 +33,7 @@ use yii\authclient\OAuth2;
...
@@ -32,7 +33,7 @@ use yii\authclient\OAuth2;
* ]
* ]
* ~~~
* ~~~
*
*
* @see http://vk.com/
apps.php?act=add&site=1
* @see http://vk.com/
editapp?act=create
* @see http://vk.com/developers.php?oid=-1&p=users.get
* @see http://vk.com/developers.php?oid=-1&p=users.get
*
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @author Paul Klimov <klimov.paul@gmail.com>
...
@@ -73,7 +74,7 @@ class VKontakte extends OAuth2
...
@@ -73,7 +74,7 @@ class VKontakte extends OAuth2
'photo'
'photo'
]),
]),
]);
]);
return
$attributes
;
return
array_shift
(
$attributes
[
'response'
])
;
}
}
/**
/**
...
@@ -101,4 +102,14 @@ class VKontakte extends OAuth2
...
@@ -101,4 +102,14 @@ class VKontakte extends OAuth2
{
{
return
'VKontakte'
;
return
'VKontakte'
;
}
}
/**
* @inheritdoc
*/
protected
function
defaultNormalizeUserAttributeMap
()
{
return
[
'id'
=>
'uid'
];
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment