Добавлен метод получения альтернативных ID

This commit is contained in:
2020-01-14 18:16:42 +03:00
committed by GitHub
parent 31543cb6a1
commit 8071dd839d

View File

@@ -7,7 +7,7 @@ use League\OAuth2\Client\Provider\ResourceOwnerInterface;
class SeptemberFirstUser implements ResourceOwnerInterface
{
/**
* Массив с данными о пользователе
* @var array Массив с данными о пользователе
*/
protected $data;
@@ -57,13 +57,26 @@ class SeptemberFirstUser implements ResourceOwnerInterface
}
/**
* ID пользователя
* ID пользователя (UUID)
*
* @return string
*/
public function getId(): ?string
public function getId(): string
{
return $this->getField('id');
}
/**
* Устаревшие ID пользователя (UUID)
* Эти ID остаются после объединения уч. записей.
*
* @return array<string>
*/
public function getIdAlt(): array
{
return $this->getField('id_alt') ?? [];
}
/**
* {@inheritdoc}
*/