2 Commits
v1.0 ... v1.0.1

2 changed files with 25 additions and 3 deletions

View File

@@ -5,6 +5,15 @@ This package provides [September First](https://api.1sept.ru) integration for [O
## Installation
Add to `composer.json`:
```
"repositories": [{
"type": "vcs",
"url": "https://github.com/1sept/oauth2-1sept"
}],
```
Then execute:
```sh
composer require 1sept/oauth2-1sept
```

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}
*/