Added support for LDAP user photo profile
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user