Copied to clipboard

Flag this post as spam?

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


  • Randar 4 posts 20 karma points
    Apr 06, 2009 @ 23:29
    Randar
    0

    Custom Member and User Providers

    We have an existing system with quite a large number of users/roles. So I wanted to leverage the membershipProvider and roleProvider to pull them out. Since Umbraco has both users and members, I planned to have three different providers:

    -One that pulls the users out, instead of UsersMembershipProvider
    -One that pulls the members out, instead of UmbracoMembershipProvider
    -One that pulls the member groups out, instead of UmbracoRoleProvider

    As far as I can tell, the member/role seems to be working, but the user is behaving very strangely. I can't seem to create any users without an exception.

    [i][FormatException: Input string was not in a correct format.]
    System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7467367
    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
    System.Int32.Parse(String s) +23
    umbraco.cms.presentation.user.EditUser.Page_Load(Object sender, EventArgs e) +182
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    umbraco.BasePages.BasePage.OnLoad(EventArgs e) +41
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627[/i]

    This will actually create a user in my database, but if I try to reload the Users node, the new user is not there. It's almost like it's creating users using my membershipProvider, but reading them from the umbracoUser table. The other evidence that is telling me that it is not fully using my membershipProvider is that I changed the email in the umbracoUser table, and that is the one being displayed through the UI.

    If you create your own membership provider for users, can you get it to not use the umbracoUser table at all?

    Here are my settings:

    Web.config

    [i][/i]



    [i]

    [/i]

    umbracoSettings.config

    [i][/i]





































Please Sign in or register to post replies

Write your reply to:

Draft