Vinoteca: wine shop on 1C-Bitrix (module, template, components, pages)

This commit is contained in:
jimagie committed 2026-10-22 19:35:23 +05:00
commit 0590195880
593 files changed
+27942

No files matched your search

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Jinove\Vinoteca;
use Bitrix\Main\Engine\CurrentUser;
use Bitrix\Main\Localization\Loc;
class Account
{
public static function isAuthorized(): bool
{
return (int)CurrentUser::get()->getId() > 0;
}
public static function url(): string
{
return SITE_DIR . (self::isAuthorized() ? "personal/" : "login/");
}
public static function label(string $accountCode, string $loginCode): string
{
$code = self::isAuthorized() ? $accountCode : $loginCode;
$text = (string)Loc::getMessage($code);
return $text !== "" ? $text : (string)Loc::getMessage($accountCode);
}
}