From af3dcf0137a6bafc8b27583fdabc184bf3afcccf Mon Sep 17 00:00:00 2001 From: Ahmet Date: Tue, 26 Jan 2021 15:50:31 +0300 Subject: [PATCH] Update Index.cshtml --- .../Pages/Index.cshtml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml index 62ead393a5..3f37ed5a3e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml @@ -2,6 +2,16 @@ @using Localization.Resources.AbpUi @using Microsoft.Extensions.Localization @using MyCompanyName.MyProjectName.Pages +@using Volo.Abp.Users @model IndexModel @inject IStringLocalizer Localizer -@Localizer["Login"] \ No newline at end of file +@inject ICurrentUser CurrentUser + +@if (!CurrentUser.IsAuthenticated) +{ + @Localizer["Login"] +} +else +{ + Welcome: @CurrentUser.UserName +} \ No newline at end of file