mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
Add new field attributes to user to store data from SAML connection
This commit is contained in:
@@ -100,7 +100,14 @@ class User implements AdvancedUserInterface {
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
|
||||
*/
|
||||
private $groupCenters;
|
||||
|
||||
|
||||
/**
|
||||
* Array where SAML attributes's data are stored
|
||||
* @var array
|
||||
*
|
||||
* @ORM\Column(type="json_array", nullable=true)
|
||||
*/
|
||||
private $attributes;
|
||||
|
||||
/**
|
||||
* User constructor.
|
||||
@@ -346,4 +353,31 @@ class User implements AdvancedUserInterface {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set attributes
|
||||
*
|
||||
* @param array $attributes
|
||||
*
|
||||
* @return Report
|
||||
*/
|
||||
public function setAttributes($attributes)
|
||||
{
|
||||
$this->attributes = $attributes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributes
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getAttributes()
|
||||
{
|
||||
if ($this->attributes === null) {
|
||||
$this->attributes = [];
|
||||
}
|
||||
|
||||
return $this->attributes;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user