2017-09-19 22:36:16 +05:30
|
|
|
<?php
|
2018-02-28 03:57:35 +05:30
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace api\modules\oauth\models;
|
2017-09-19 22:36:16 +05:30
|
|
|
|
|
|
|
use api\models\base\BaseAccountForm;
|
|
|
|
use api\modules\accounts\models\AccountInfo;
|
|
|
|
use common\models\Account;
|
|
|
|
|
2018-02-28 03:57:35 +05:30
|
|
|
class IdentityInfo extends BaseAccountForm {
|
2017-09-19 22:36:16 +05:30
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
private readonly AccountInfo $model;
|
2017-09-19 22:36:16 +05:30
|
|
|
|
|
|
|
public function __construct(Account $account, array $config = []) {
|
|
|
|
parent::__construct($account, $config);
|
|
|
|
$this->model = new AccountInfo($account);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function info(): array {
|
|
|
|
$response = $this->model->info();
|
|
|
|
|
|
|
|
$response['profileLink'] = $response['elyProfileLink'];
|
|
|
|
unset($response['elyProfileLink']);
|
|
|
|
$response['preferredLanguage'] = $response['lang'];
|
|
|
|
unset($response['lang']);
|
|
|
|
|
|
|
|
return $response;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|