Made person identity optional for user

This commit is contained in:
Kevin Frantz
2018-11-22 21:54:57 +01:00
parent e63b265ee4
commit d67ffb2a50
4 changed files with 58 additions and 15 deletions

View File

@@ -34,7 +34,11 @@ class UserSource extends AbstractComplexSource implements UserSourceInterface
public function __construct()
{
$this->personIdentitySource = new PersonIdentitySource();
parent::__construct();
}
public function hasPersonIdentitySource(): bool
{
return isset($this->personIdentitySource);
}
}

View File

@@ -10,4 +10,10 @@ use App\Entity\Attribut\PersonIdentitySourceAttributInterface;
*/
interface UserSourceInterface extends ComplexSourceInterface, UserAttributInterface, PersonIdentitySourceAttributInterface
{
/**
* Checks if the user has an identity source.
*
* @return bool
*/
public function hasPersonIdentitySource(): bool;
}