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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
a286f309
Commit
a286f309
authored
Dec 23, 2013
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default normalize user attribute map added to OpentId clients.
parent
ba95e1dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
ClientTrait.php
extensions/yii/authclient/ClientTrait.php
+1
-1
GoogleOpenId.php
extensions/yii/authclient/clients/GoogleOpenId.php
+13
-0
YandexOpenId.php
extensions/yii/authclient/clients/YandexOpenId.php
+11
-0
No files found.
extensions/yii/authclient/ClientTrait.php
View file @
a286f309
...
...
@@ -203,7 +203,7 @@ trait ClientTrait
* Particular client may override this method in order to provide specific default map.
* @return array normalize attribute map.
*/
p
ublic
function
defaultNormalizeUserAttributeMap
()
p
rotected
function
defaultNormalizeUserAttributeMap
()
{
return
[];
}
...
...
extensions/yii/authclient/clients/GoogleOpenId.php
View file @
a286f309
...
...
@@ -35,6 +35,19 @@ class GoogleOpenId extends OpenId
/**
* @inheritdoc
*/
protected
function
defaultNormalizeUserAttributeMap
()
{
return
[
'first_name'
=>
'namePerson/first'
,
'last_name'
=>
'namePerson/last'
,
'email'
=>
'contact/email'
,
'language'
=>
'pref/language'
,
];
}
/**
* @inheritdoc
*/
protected
function
defaultViewOptions
()
{
return
[
...
...
extensions/yii/authclient/clients/YandexOpenId.php
View file @
a286f309
...
...
@@ -33,6 +33,17 @@ class YandexOpenId extends OpenId
/**
* @inheritdoc
*/
protected
function
defaultNormalizeUserAttributeMap
()
{
return
[
'name'
=>
'namePerson'
,
'email'
=>
'contact/email'
,
];
}
/**
* @inheritdoc
*/
protected
function
defaultViewOptions
()
{
return
[
...
...
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