@inherits RazorTemplateBase<RazorTemplateModel<Template>>
@using Dynamicweb.Rendering;

@{
	string resultUserName = "",
		firstName = GetString("UserManagement:User.FirstName"),
		lastName = GetString("UserManagement:User.LastName"),
		name = GetString("UserManagement:User.Name");
	string email = GetString("UserManagement:User.Email");
	string approveAccount = GetString("UserManagement.ApprovalUrl");

	if (!string.IsNullOrEmpty(firstName) && !string.IsNullOrEmpty(lastName))
	{
		resultUserName = " " + firstName + " " + lastName;
	}
	else if (!string.IsNullOrEmpty(firstName))
	{
		resultUserName = " " + firstName;
	}
	else if (!string.IsNullOrEmpty(name))
	{
		resultUserName = " " + name;
	}
	else
	{
		resultUserName = "";
	}

	string website = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + GetGlobalValue("Global:Request.Host");
	string signInPage = website + "/Default.aspx?Id=" + GetPageIdByNavigationTag("SignInPage").ToString();
}

<h1>@Translate("Hi and welcome") @resultUserName</h1>
<h4>@Translate("You are one click away from activating your user account")</h4>
<p>@Translate("Please click the button below to confirm your email") @email @Translate("for your user account at") @website</p>
<a href="@approveAccount">@Translate("Click here and confirm your email")</a>
<p>@Translate("You will receive an email when your account is ready to use.")</p>
