Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
modules
user
services
GoogleService.php
1
<?php
2
/**
3
*
4
*/
5
class
GoogleService
extends
GoogleOpenIDService
implements
IUserFields
6
{
7
8
/**
9
* @var array the OpenID required attributes.
10
*/
11
protected
$requiredAttributes = array(
12
'firstname'
=> array(
'firstname'
,
'namePerson/first'
),
13
'lastname'
=> array(
'lastname'
,
'namePerson/last'
),
14
'email'
=> array(
'email'
,
'contact/email'
),
15
'language'
=> array(
'language'
,
'pref/language'
),
16
);
17
18
/**
19
* Fetch attributes array.
20
* @return boolean whether the attributes was successfully fetched.
21
*/
22
protected
function
fetchAttributes
()
23
{
24
$this->attributes[
'name'
] = $this->attributes[
'firstname'
] .
' '
. $this->attributes[
'lastname'
];
25
$this->attributes[
'displayId'
] = $this->attributes[
'email'
];
26
return
true
;
27
}
28
29
public
function
getName()
30
{
31
return
$this->attributes[
'name'
];
32
}
33
34
public
function
getEmail()
35
{
36
return
$this->attributes[
'email'
];
37
}
38
39
public
function
getError()
40
{
41
return
UserModule::t
(
'Google authorization error'
);
42
}
43
}
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2