feat: oauth2 login via myep
This commit is contained in:
@@ -83,6 +83,19 @@ class Address
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public static function fromUserinfo(array $userinfo): static
|
||||
{
|
||||
$instance = new static();
|
||||
$instance
|
||||
->setStreet($userinfo['profile']['address']['street'] ?? null)
|
||||
->setPostCode($userinfo['profile']['address']['postcode'] ?? null)
|
||||
->setCity($userinfo['profile']['address']['city'] ?? null)
|
||||
->setCountry($userinfo['profile']['address']['country'] ?? 'DE')
|
||||
;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function getStreet(): ?string
|
||||
{
|
||||
return $this->street;
|
||||
|
||||
@@ -65,6 +65,18 @@ class Communication
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public static function fromUserinfo(array $userinfo): static
|
||||
{
|
||||
$instance = new static();
|
||||
$instance
|
||||
->setPhone($userinfo['profile']['communication']['phone'] ?? null)
|
||||
->setMobile($userinfo['profile']['communication']['mobile'] ?? null)
|
||||
->setEmail($userinfo['profile']['communication']['email'] ?? null)
|
||||
;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function getPhone(): ?string
|
||||
{
|
||||
return $this->phone;
|
||||
|
||||
Reference in New Issue
Block a user