getId(); if ($userId <= 0) { LocalRedirect(SITE_DIR . "login/?back=" . rawurlencode(SITE_DIR . "personal/")); } $row = UserTable::getRow(["select" => ["NAME", "EMAIL", "PERSONAL_PHONE"], "filter" => ["=ID" => $userId]]) ?? []; $GLOBALS["APPLICATION"]->SetTitle(Loc::getMessage("VINO_CAB_PAGE_TITLE")); $GLOBALS["APPLICATION"]->SetPageProperty("description", Loc::getMessage("VINO_CAB_PAGE_DESCRIPTION")); $GLOBALS["APPLICATION"]->SetPageProperty("vino_alternates", "N"); $GLOBALS["APPLICATION"]->SetPageProperty("vino_schema", "N"); $GLOBALS["APPLICATION"]->SetPageProperty("robots", "noindex, nofollow"); $this->arResult = [ "NAME" => (string)($row["NAME"] ?? ""), "EMAIL" => (string)($row["EMAIL"] ?? ""), "PHONE" => preg_replace('/^\+7(\d{3})(\d{3})(\d{2})(\d{2})$/', '+7 $1 $2 $3 $4', (string)($row["PERSONAL_PHONE"] ?? "")), ]; $this->includeComponentTemplate(); return $this->arResult; } }