1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
yandex.php
См. документацию.
1<?php
2
3namespace Bitrix\Mail\Helper\OAuth;
4
5use Bitrix\Main;
6use Bitrix\Mail;
7
9{
10
11 protected function __construct()
12 {
13 $this->oauthEntity = new YandexInterface;
14 }
15
16 protected function check()
17 {
18 $provider = new \CSocServYandexAuth;
19
20 return $provider->checkSettings();
21 }
22
23 protected function mapUserData(array $userData)
24 {
25 return array(
26 'email' => $userData['default_email'],
27 'first_name' => $userData['first_name'],
28 'last_name' => $userData['last_name'],
29 'full_name' => $userData['real_name'],
30 'image' => sprintf('https://avatars.yandex.net/get-yapic/%s/islands-middle', $userData['default_avatar_id']),
31 //'error' => $data['error']['message'],
32 );
33 }
34
35 public static function getServiceName()
36 {
37 return 'yandex';
38 }
39
40 public function getControllerUrl()
41 {
42 return \CSocServYandexAuth::CONTROLLER_URL;
43 }
44
45}
46
47if (Main\Loader::includeModule('socialservices'))
48{
49 class YandexInterface extends \CYandexOAuthInterface
50 {
51
52 public function getStorageTokens()
53 {
54 return false;
55 }
56
57 public function getTokenData()
58 {
59 return array(
60 'access_token' => $this->access_token,
61 'refresh_token' => $this->refresh_token,
62 'expires_in' => $this->accessTokenExpires,
63 );
64 }
65
66 public function getNewAccessToken($refreshToken = false, $userId = 0, $save = false)
67 {
68 return false;
69 }
70
71 }
72}
if(!Loader::includeModule('messageservice')) $provider
Определения callback_ednaruimhpx.php:21
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getServiceName()
Определения yandex.php:35
mapUserData(array $userData)
Определения yandex.php:23
getControllerUrl()
Определения yandex.php:40
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$save
Определения iblock_catalog_edit.php:365