Skip to content

Commit

Permalink
Do not include "Change password" item in the user menu if local login…
Browse files Browse the repository at this point in the history
… is disabled (#16598)

Co-authored-by: Hisham Bin Ateya <[email protected]>
  • Loading branch information
mvarblow and hishamco authored Aug 21, 2024
1 parent 51f24d7 commit bf42ea9
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<li>
<a class="dropdown-item" asp-area="@UserConstants.Features.Users" asp-controller="Account" asp-action="ChangePassword" asp-route-returnUrl="@FullRequestPath">
<i class="fa-solid fa-key" aria-hidden="true"></i> @T["Change password"]
</a>
</li>
@using OrchardCore.Users.Models

@if (!Site.As<LoginSettings>().DisableLocalLogin)
{
<li>
<a class="dropdown-item" asp-area="@UserConstants.Features.Users" asp-controller="Account" asp-action="ChangePassword" asp-route-returnUrl="@FullRequestPath">
<i class="fa-solid fa-key" aria-hidden="true"></i> @T["Change password"]
</a>
</li>
}
<li>
<form asp-route-area="@UserConstants.Features.Users" asp-controller="Account" asp-action="LogOff" method="post" class="no-multisubmit">
<button type="submit" class="dropdown-item">
Expand Down

0 comments on commit bf42ea9

Please sign in to comment.