Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
GoogleService.php
1 <?php
2 /**
3  *
4  */
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 }