src/GuzzleOauth/Consumer/Google.php
public function getUserEmail($info = NULL) {
    if (empty($info)) {
      $info = $this->getUserInfo();
    }
    $emails = $info->get('emails');
    if (is_array($emails) && count($emails)) {
      $email = reset($emails);
      return $email['value'];
    }
  }
public function getUserEmail($info = NULL) {
    if (empty($info)) {
      $info = $this->getUserInfo();
    }
    $emails = $info->get('emails');
    if (is_array($emails) && count($emails)) {
      $email = reset($emails);
      return $email['value'];
    }
  }
public function getUserEmail ( $ info = NULL ) { if ( empty ( $ info ) ) { $ info = $ this -> getUserInfo ( ) ; } $ emails = $ info -> get ( 'emails' ) ; if ( is_array ( $ emails ) && count ( $ emails ) ) { $ email = reset ( $ emails ) ; return $ email [ 'value' ] ; } }
Google can return an array of emails.
We only give back the first one, since we request one e-mail address
Google can return an array of emails . We only give back the first one since we request one e - mail address