/** * {@inheritDoc} * * This adds also the handling of multiple emails, as a google account may * have more than one email * * @param boolean $all Fetch _all_ the emails ? * @return array|string */ public function getEmail($all = false) { if (!$all && is_array($this->email)) { return reset($this->email) ?: null; } return parent::getEmail(); }