Skip to content

Commit

Permalink
Merge pull request #3826 from thabaum/profile-registration-button-ret…
Browse files Browse the repository at this point in the history
…urn-url-fix

Fix handling of returnurl parameter in UserProfile component - Fixes #3825
  • Loading branch information
sbwalker authored Feb 18, 2024
2 parents 96a29e9 + 57a86cd commit 6f215cb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Oqtane.Client/Themes/Controls/Theme/UserProfile.razor
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@

protected override void OnParametersSet()
{
_returnurl = WebUtility.UrlEncode(PageState.Route.PathAndQuery);
if (!PageState.QueryString.ContainsKey("returnurl"))
{
// remember current url
_returnurl += WebUtility.UrlEncode(PageState.Route.PathAndQuery);
}
else
{
// use existing value
_returnurl += PageState.QueryString["returnurl"];
}
}
}

Expand Down

0 comments on commit 6f215cb

Please sign in to comment.