} $strError = false; $strWarning = false; if ($_SERVER["REQUEST_METHOD"] === "POST" && check_bitrix_sessid()) { CUtil::JSPostUnescape(); $strAction = trim($_POST["action"]); $strAction = in_array($strAction, array("invite", "add")) ? $strAction : false; if ($strAction == "invite") { if ($_POST["EMAIL"] == GetMessage("BX24_INVITE_DIALOG_EMAILS_DESCR")) { $_POST["EMAIL"] = ""; } if (intval($_POST["DEPARTMENT_ID"]) <= 0 && (!isset($_POST["SONET_GROUPS_CODE"]) || empty($_POST["SONET_GROUPS_CODE"])) && $bExtranetInstalled) { $strError = GetMessage("BX24_INVITE_DIALOG_ERROR_EXTRANET_NO_SONET_GROUP_INVITE"); } if (!$strError) { $ID_INVITED = CIntranetInviteDialog::RegisterNewUser($SITE_ID, $_POST, $arError); if (is_array($arError) && count($arError) > 0) { $strError = ""; $ID_INVITED = 0; foreach ($arError as $strErrorText) { if (strlen($strErrorText) > 0) { $strError .= '<li style="list-style-position: inside;">' . $strErrorText . '</li>'; } } } } } elseif (preg_match("/^reinvite_user_id_(\\d+)\$/", $_REQUEST["reinvite"], $match)) { CIntranetInviteDialog::ReinviteUser($SITE_ID, $match[1]); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_js.php"; } elseif (preg_match("/^reinvite_user_id_extranet_(\\d+)\$/", $_REQUEST["reinvite"], $match)) { CIntranetInviteDialog::ReinviteExtranetUser($SITE_ID, $match[1]);