Copied to clipboard

Flag this post as spam?

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


  • Amalie Wowern 113 posts 220 karma points
    Sep 21, 2015 @ 08:12
    Amalie Wowern
    0

    Use member login for member and users

    Hi

    I'm trying to make a login where both members and users can login.

    Is there a easy way to that?

    Right now i'm using the partial made by umbraco - and users can't login

    @{
    var loginModel = new LoginModel();
    
    Html.EnableClientValidation();
    Html.EnableUnobtrusiveJavaScript();
    Html.RequiresJs("/umbraco_client/ui/jquery.js");
    Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
    Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
    }
    
    @using (Html.BeginUmbracoForm<UmbLoginController>("HandleLogin"))
    {
    <fieldset>
        <legend>Login</legend>
    
        @Html.ValidationSummary("loginModel", true)
    
        @Html.LabelFor(m => loginModel.Username)
        @Html.TextBoxFor(m => loginModel.Username)
        @Html.ValidationMessageFor(m => loginModel.Username)
        <br />
    
        @Html.LabelFor(m => loginModel.Password)
        @Html.PasswordFor(m => loginModel.Password)
        @Html.ValidationMessageFor(m => loginModel.Password)
        <br />
    
        <button>Login</button>
    </fieldset>  
    

    }

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Sep 21, 2015 @ 10:38
    Alex Skrypnyk
    0

    Hi Amalie,

    This partial works only for members. If you want to create authentication controller for users and members, you have to make custom controller and pass data to it.

    Thanks, Alex

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies