mirror of
https://github.com/1sept/oauth2-1sept.git
synced 2024-05-30 17:38:52 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8071dd839d | |||
| 31543cb6a1 |
@@ -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
|
||||
```
|
||||
|
||||
@@ -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}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user