• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/user.php
  • Класс: CAllUser
  • Вызов: CAllUser::LoginByCookies
public function LoginByCookies()
{
	if (Option::get('main', 'store_password', 'Y') == 'Y')
	{
		if (!isset($_REQUEST["logout"]) || strtolower($_REQUEST["logout"]) != "yes")
		{
			$prefix = Option::get('main', 'cookie_name', 'BITRIX_SM');
			$login = (string)($_COOKIE[$prefix . '_UIDL'] ?? '');
			$password = (string)($_COOKIE[$prefix . '_UIDH'] ?? '');

			if ($login != '' && $password != '')
			{
				if ($login != $this->GetLogin() || $password !== $this->getContext()->getStoredAuthHash())
				{
					$this->LoginByHash($login, $password);
				}
			}
		}
	}
}