Copied to clipboard

Flag this post as spam?

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


  • Charles Afford 1163 posts 1709 karma points
    Feb 11, 2013 @ 13:21
    Charles Afford
    0

    Saving custom member properties to database.

    Hello, Been trying to do this but no success.   Any one had any joy?  Thanks.  Charlie :)

  • Antony Briggs 78 posts 103 karma points
    Feb 14, 2013 @ 12:35
    Antony Briggs
    0

     

    Hey Charles, 

    The since v4 the official way to do this is with the .net Membership API ala:

    http://www.aaron-powell.com/umbraco-members-profiles

    and

    http://our.umbraco.org/wiki/how-tos/membership-providers

    However, you can't change the Member's login name or the display name via the membership API, so you can fallback to the (depricated) businesslogic Member:

    using umbraco.cms.businesslogic.member;

    Member m = Member.GetMemberFromLoginName(username);
    m.getProperty("blah").Value = "wibble";
    // save and re-generate the XML:
    m.Save();

    TTFN

    Ant

     

  • Charles Afford 1163 posts 1709 karma points
    Feb 15, 2013 @ 19:30
    Charles Afford
    0

    Hi, worked this out now.  Thanks for the help :)

  • Dmitrij Jazel 86 posts 179 karma points
    Feb 18, 2013 @ 19:14
    Dmitrij Jazel
    0

    Hi Charles,

    Can you please show me your web-config, the <membership> and the <profile> part if you can, please :)

    Still struggling with membership :-(...

    now I am getting 

    The username of a Member must be different from an emptry string
    Parameter name: loginName

    ... When I am trying to access all the users 

    and this is 

    System.ArgumentException: The username of a Member must be different from an emptry string

    Parameter name: loginName 

    Exception

    I think my problem might be in web-config...

     

Please Sign in or register to post replies

Write your reply to:

Draft