mirror of
https://github.com/elyby/accounts.git
synced 2024-11-17 02:32:59 +05:30
31 lines
740 B
PHP
31 lines
740 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace api\modules\oauth\models;
|
|
|
|
use api\models\base\BaseAccountForm;
|
|
use api\modules\accounts\models\AccountInfo;
|
|
use common\models\Account;
|
|
|
|
class IdentityInfo extends BaseAccountForm {
|
|
|
|
private $model;
|
|
|
|
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;
|
|
}
|
|
|
|
}
|