Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/components/bitrix/main.auth.forgotpasswd/ |
Upload File : |
<?php if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } use Bitrix\Main\Application; \CBitrixComponent::includeComponentClass('bitrix:main.auth.form'); class MainForgotPasswdComponent extends MainAuthFormComponent { /** * Processing request new pass. * @return void */ protected function actionRequest() { if (!defined('ADMIN_SECTION') || ADMIN_SECTION !== true) { $lid = LANG; } else { $lid = false; } $res = \CUser::SendPassword( $this->requestField('login'), $this->requestField('email'), $lid, $this->request('captcha_word'), $this->request('captcha_sid') ); if ( !$this->processingErrors($res) && isset($res['MESSAGE']) ) { $this->arResult['SUCCESS'] = $res['MESSAGE']; } } /** * Base executable method. * @param boolean $applyTemplate Apply template or not. * @return void */ public function executeComponent($applyTemplate = true) { // check authorization if ($this->isAuthorized()) { $this->arResult['AUTHORIZED'] = true; $this->IncludeComponentTemplate(); return; } // init vars $request = Application::getInstance()->getContext()->getRequest(); // tpl vars $this->arResult['SUCCESS'] = null; $this->arResult['FIELDS'] = $this->formFields; $this->arResult['LAST_LOGIN'] = $request->getCookie( 'LOGIN' ); $this->arResult['AUTH_AUTH_URL'] = $this->checkParam( 'AUTH_AUTH_URL', '' ); $this->arResult['AUTH_REGISTER_URL'] = $this->checkParam( 'AUTH_REGISTER_URL', '' ); if ($this->getOption('captcha_restoring_password', 'N') == 'Y') { $this->arResult['CAPTCHA_CODE'] = $this->getApplication()->CaptchaGetCode(); } else { $this->arResult['CAPTCHA_CODE'] = ''; } // processing if ($this->requestField('action')) { $this->actionRequest(); } $this->arResult['ERRORS'] = $this->getErrors(); if ($applyTemplate) { $this->IncludeComponentTemplate(); } } }