Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • SlothMonkey 17 posts 56 karma points
    Jan 27, 2015 @ 09:45
    SlothMonkey
    0

    Amending Umbraco Log in page

    Right now I'm letting Umbraco handle the logging in of my members through my website so I have no access to its controller. Because of this I have no way of letting the user know they have successfully logged in or not.

    So how can I expand upon the preexisting umbraco login logic to let me either display something to say they've logged in, or to redirect them to a different page?

    My log in view is this

    @using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
    {
        <legend>Login</legend>
    
        @Html.ValidationSummary("loginModel", true)
    
        @Html.TextBoxFor(m => loginModel.Username, new { @class = "form-control", @placeholder = "Username" })
        @Html.ValidationMessageFor(m => loginModel.Username, "", new { @class = "alert-danger", @role = "alert" })
        <br />
    
        @Html.PasswordFor(m => loginModel.Password, new { @class = "form-control", @placeholder = "Password" })
        @Html.ValidationMessageFor(m => loginModel.Password, "", new { @class = "alert-danger", @role = "alert" })
        <br />
    
        <button class="btn btn-default">Login</button>
    } 
    
  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jan 27, 2015 @ 10:02
    Dennis Aaen
    1

    Hi SlothMonkey,

    Perhaps this article from the advent calendar 2 years ago written by Jonas Eriksson could be a  good starting point for you. On how to create a login form using a MVC surfacecontroller.

    http://24days.in/umbraco/2012/creating-a-login-form-with-umbraco-mvc-surfacecontroller/

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft