This project is read-only.

Login and Logoff menus

Topics: General, Installing Orchard
Nov 25, 2012 at 6:31 PM


I have installed the content permission module, I can now create special content that only authenticated users will see.

My question now is how could I provide easily a login and logoff menu ?

Thanks for any idea.


Nov 25, 2012 at 6:59 PM

Finally found users/account/LogOn and LogOff

Next challenge, with same button do logoff when already logged?

Dec 12, 2012 at 9:05 AM

In the template, do something along the following lines:

@if (User.Identity.IsAuthenticated) {
    @Html.ActionLink(T("Log off").ToString(), "LogOff", "Account", new { area = "Orchard.Users" })
else {
  @Html.ActionLink(T("Log on").ToString(), "LogOn", "Account", new { area = "Orchard.Users" })