diff --git a/API/Group17AuthApi.cs b/API/Group17AuthApi.cs index 2469c9607d95594cb7f8cc4fa683d6b7b5996804..8012efb4c192354a6c7a903ad59a2f77038a31f1 100644 --- a/API/Group17AuthApi.cs +++ b/API/Group17AuthApi.cs @@ -74,7 +74,7 @@ namespace Group17.Auth /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> /// <returns>No Content</returns> /// <exception cref="APIException">A server side error occurred.</exception> - System.Threading.Tasks.Task ResendConfirmEmailAsync(string callbackUrl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ResendConfirmEmailAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> /// <returns>No Content</returns> @@ -952,15 +952,10 @@ namespace Group17.Auth /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> /// <returns>No Content</returns> /// <exception cref="APIException">A server side error occurred.</exception> - public virtual async System.Threading.Tasks.Task ResendConfirmEmailAsync(string callbackUrl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public virtual async System.Threading.Tasks.Task ResendConfirmEmailAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/Auth/ResendConfirmEmail?"); - if (callbackUrl != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("callbackUrl") + "=").Append(System.Uri.EscapeDataString(ConvertToString(callbackUrl, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; + urlBuilder_.Append("api/Auth/ResendConfirmEmail"); var client_ = _httpClient; var disposeClient_ = false; diff --git a/Pages/Profile/ProfileMain.razor b/Pages/Profile/ProfileMain.razor index 98cc9bc4677aaccf2d3ff1a96d6aec63d8505623..8f68100a14ed5fae5db1a6e0d0b90791d0a619bb 100644 --- a/Pages/Profile/ProfileMain.razor +++ b/Pages/Profile/ProfileMain.razor @@ -102,7 +102,7 @@ else </MudItem> <MudItem xs="12" sm="12"> <MudPaper Class="pa-4"> - @if (Profile == null) + @if (Profile == null && (UserId == null || UserId == UserInfo?.UserId)) { <MudForm @ref="_form" Disabled="@(UserId != null && UserInfo?.UserId != UserId)" Model="NewDetails"> <MudTextField T="string" Label="First Name" Disabled="true" Value="UserInfo.Firstname"/> @@ -126,9 +126,12 @@ else else { <MudForm @ref="_form" Disabled="@(UserId != null && UserInfo?.UserId != UserId)" Model="Profile"> - <MudTextField T="string" Label="First Name" Disabled="true" Value="UserInfo.Firstname"/> - <MudTextField T="string" Label="Surname" Disabled="true" Value="UserInfo.Surname"/> - <MudTextField T="string" Label="Email Address" Disabled="true" Value="UserInfo.EmailAddress"/> + @if (UserId == null || UserInfo?.UserId == UserId) + { + <MudTextField T="string" Label="First Name" Disabled="true" Value="@(UserInfo.Firstname)"/> + <MudTextField T="string" Label="Surname" Disabled="true" Value="UserInfo.Surname"/> + <MudTextField T="string" Label="Email Address" Disabled="true" Value="UserInfo.EmailAddress"/> + } <MudSelect T="string" Label="Gender" AnchorOrigin="Origin.TopCenter" @bind-Value="Profile.Gender"> <MudSelectItem Value="@("Male")"/> <MudSelectItem Value="@("Female")"/>