diff --git a/app/library/OAuth/UserData/LinkedIn.php b/app/library/OAuth/UserData/LinkedIn.php new file mode 100644 index 0000000..60b6e4f --- /dev/null +++ b/app/library/OAuth/UserData/LinkedIn.php @@ -0,0 +1,63 @@ +data = $data; + } + + /** + * {@inheritDoc} + */ + public function getProvider() + { + return 'LinkedIn'; + } + + /** + * {@inheritDoc} + */ + public function getId() + { + return $this->data['id']; + } + + /** + * {@inheritDoc} + */ + public function getUsername() + { + return null; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + $name = ''; + if (isset($this->data['firstName'])) { + $name = $this->data['firstName']; + } + if (isset($this->data['lastName'])) { + $name .= ' ' . $this->data['lastName']; + } + return $name; + } + + /** + * {@inheritDoc} + */ + public function getEmail() + { + return $this->data['emailAddress']; + } +}