Copied to clipboard

Flag this post as spam?

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


  • Alejandro 23 posts 45 karma points
    Jul 07, 2015 @ 18:31
    Alejandro
    0

    Cannot update Member property on Created event

    Hello everyone,

    I need to perform some functionality after a user is created; sending some emails, updating some member properties, etc. I registered my event handler with MemberService.Created += OnMemberCreated

    Everything seems to be working fine except the property update. This is a simplified version of the code from my event handler:

    IMember member = e.Entity;
    member.SetValue("myProperty", "myValue");
    sender.Save(member);
    

    Problem is that the value never gets set. I know the code is working because it's actually from a static function that I'm using elsewhere, so the property name is correct, etc.

    Is there something else I need to do in order to update it properly? Thanks!


    UPDATE: Turns out that sender.Save(member) is indeed saving the member (and property) correctly with "myValue" but something afterwards is blanking out my property. Any ideas?

  • Alejandro 23 posts 45 karma points
    Jul 08, 2015 @ 14:37
    Alejandro
    1

    Turns out this is a known bug, reported on March 05. http://issues.umbraco.org/issue/U4-6366

    Another thread talking about the issue: https://our.umbraco.org/forum/developers/api-questions/63555-AssignRole-not-saving

  • Phil Gilligan 25 posts 136 karma points
    Jul 16, 2015 @ 13:54
    Phil Gilligan
    0

    Thanks Alejandro.

    Please can everyone who is having this issue please vote for it in bug tracker:

    http://issues.umbraco.org/issue/U4-6366

    That should raise the priority of a potential fix.

    (Please note, you may need to create a bug tracker account first)

  • 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