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
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|