Copied to clipboard

Flag this post as spam?

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


  • Evan 344 posts 99 karma points
    Apr 15, 2009 @ 19:55
    Evan
    0

    User login in 4.0.1 with the hashing password problem

    I have set up a user login and redirect and I am having a problem because of the hashing passwords since I am using 4.0.1. Everything should be set up fine but for some reason the members are being checked as null, and I think it has to do with the hashing problem. Here is the code that I have used to check for everything.

    <script runat="server"><br />
    <br />
    private void Login1_LoggedIn(object sender, EventArgs e) {<br />
                Login ctrl = (Login) UmbracoLoginView.FindControl("Login1");<br />
                Member member = Member.GetMemberFromLoginNameAndPassword(ctrl.UserName, ctrl.Password);<br />
    <br />
                if ((member != null) &amp;&amp; (member.Id > 0)) {<br />
                <br />
                    try {<br />
                        int nodeId = int.Parse(member.getProperty("redirect").Value.ToString());<br />
                        if (nodeId > 0)<br />
                            Response.Redirect(umbraco.library.NiceUrl(nodeId), true);<br />
    <br />
                    } <br />
                    catch {<br />
                    }<br />
    <br />
                    Response.Redirect("/error.aspx");<br />
                }Response.Redirect("/notin.aspx");<br />
            }<br />
    <br />
    </script>






  • 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