Added support for LDAP user photo profile

This commit is contained in:
Frederic Guillot
2016-05-07 12:59:35 -04:00
parent 94989663ec
commit 300dabe6b4
19 changed files with 377 additions and 13 deletions

View File

@@ -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;
}
}