user identity improvements
This commit is contained in:
		| @ -1,4 +1,5 @@ | ||||
| @namespace Oqtane.UI | ||||
| @using System.Net | ||||
| @inject IJSRuntime JSRuntime | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject SiteState SiteState | ||||
| @ -87,6 +88,13 @@ | ||||
|  | ||||
|     protected override async Task OnAfterRenderAsync(bool firstRender) | ||||
|     { | ||||
|         // force user to provide email address (email may be missing if using external login) | ||||
|         if (PageState.User != null && string.IsNullOrEmpty(PageState.User.Email) && PageState.Route.PagePath != "profile") | ||||
|         { | ||||
|             NavigationManager.NavigateTo(Utilities.NavigateUrl(PageState.Alias.Path, "profile", "returnurl=" + WebUtility.UrlEncode(PageState.Route.PathAndQuery))); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         if (!firstRender) | ||||
|         { | ||||
|             if (!string.IsNullOrEmpty(PageState.Page.HeadContent) && PageState.Page.HeadContent.Contains("<script")) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 sbwalker
					sbwalker