Copied to clipboard

Flag this post as spam?

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


  • Harshit 64 posts 226 karma points
    Apr 14, 2016 @ 11:38
    Harshit
    0

    Umbraco : how to save selected groups of membergroup in Property tab

    Hi,

    I am developing custom membership section. I am trying to save the groups associated with member in member group(umbmembergroup) of property tab programtically.

    its not in the MemberType, I think umbmembergroup internally used by system to save the groups for member. is there a property or method in MemberService /otherservices where we can look up?

    any suggestion please.

    Thanks,

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Apr 15, 2016 @ 14:36
    Dennis Adolfi
    100

    Im not sure if this is what you look for, but this is how you add a member to a membergroup with the memberservice:

    ApplicationContext.Current.Services.MemberService.AssignRole(
                                    memberId: newMember.Id,
                                    roleName: memberGroupName);
    

    Best of luck.

  • Harshit 64 posts 226 karma points
    Apr 18, 2016 @ 06:35
    Harshit
    1

    Thanks alot @Dennis.

    just to check:

    when I am assigning group in umbmembergroup: From "not a member of group " to "member of group" the form.$dirty property is false ideally it should be true. any idea on this?are these umb properties are not a part of a form or is there a different way of handing it?

    Regards,

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Apr 18, 2016 @ 07:33
    Dennis Adolfi
    0

    Glad i could be of help Harshit.

    Unfortenatly i have nothing to contribute on the form.$dirty subject (dont even know what it does) but maybe someone else will reach out in this friendly forum!

    Have a great day and good luck with the rest of the site! :)

Please Sign in or register to post replies

Write your reply to:

Draft