Copied to clipboard

Flag this post as spam?

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


  • Ben Marte 13 posts 34 karma points
    Jul 23, 2014 @ 04:47
    Ben Marte
    0

    Login and user security

    I noticed that Umbraco ships with a partial view macro for Login but I can't find any documentation on how to use it.

    I've added it to my template with @HTML.RenderPartial("partialName") it renders fine but when I try to login it says Invalid Username and Password.

    I'm trying to hide specific pages of the site based on user groups and roles so I would appreciate any info regarding accomplishing this as well if possible.

    Thanks again for helping out this umbraco n00b.

  • Denford 132 posts 323 karma points
    Jul 23, 2014 @ 08:19
    Denford
    0

    i believe the default partials use/are based on these controllers here they might be able to help you work out where/or why you cant login, https://github.com/umbraco/Umbraco-CMS/tree/6a9a1d1547e7a0508f6bed74c49ee2fd64bcf775/src/Umbraco.Web/Controllers . Assuming you do have a member already created you can then debug to see if the member is actually retrieved from the back end.

  • Ben Marte 13 posts 34 karma points
    Jul 23, 2014 @ 17:04
    Ben Marte
    0

    I'm not sure what I need to do with this, do I need to reference these controllers in umbraco?

    Sorry, I'm just very new to Umbraco and I'm not familiar with how it works with Razor and .net yet.

    Thanks.

  • Denford 132 posts 323 karma points
    Jul 24, 2014 @ 11:53
    Denford
    0

    No worries we were all there at one point :), those above are the controllers that do the logic to validate the users (dont know how good your mvc is) so your partial will submit to that to get the details checked. I haven't personally used the default login partial so am not sure whether you need to create the controllers in your solution or if they are already there by default.

    What i tend to do is have the logic in the my login partial itself (personal preference) but that means you have to write you own form which submits and hits that logic, that way i can have my break point in the same partial as the form to see whats happening instead of going to the controller.

    Either send your code here for us to have a look or i can send you my controller that i use. The other thing is what version of umbraco are you using as the membership api has changed and make sure it is the login name set on the member page in umbraco you are using by default this is the email address.

Please Sign in or register to post replies

Write your reply to:

Draft