From 300dabe6b4e9e648c1111363fad8154def7cfb5f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 7 May 2016 12:59:35 -0400 Subject: Added support for LDAP user photo profile --- app/User/LdapUserProvider.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'app/User') diff --git a/app/User/LdapUserProvider.php b/app/User/LdapUserProvider.php index 8d5d4b1f..3e2dcd2b 100644 --- a/app/User/LdapUserProvider.php +++ b/app/User/LdapUserProvider.php @@ -60,6 +60,14 @@ class LdapUserProvider implements UserProviderInterface */ protected $groupIds; + /** + * User photo + * + * @access protected + * @var string + */ + protected $photo = ''; + /** * Constructor * @@ -70,8 +78,9 @@ class LdapUserProvider implements UserProviderInterface * @param string $email * @param string $role * @param string[] $groupIds + * @param string $photo */ - public function __construct($dn, $username, $name, $email, $role, array $groupIds) + public function __construct($dn, $username, $name, $email, $role, array $groupIds, $photo = '') { $this->dn = $dn; $this->username = $username; @@ -79,6 +88,7 @@ class LdapUserProvider implements UserProviderInterface $this->email = $email; $this->role = $role; $this->groupIds = $groupIds; + $this->photo = $photo; } /** @@ -203,4 +213,15 @@ class LdapUserProvider implements UserProviderInterface { return $this->dn; } + + /** + * Get user photo + * + * @access public + * @return string + */ + public function getPhoto() + { + return $this->photo; + } } -- cgit v1.2.3