Copied to clipboard

Flag this post as spam?

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


  • Barry Fogarty 493 posts 1129 karma points
    Oct 04, 2011 @ 03:42
    Barry Fogarty
    0

    Add to use the 'Add Member To Group' events

    I would like to perform an action when a member is added to a group from the back office.  Great - there are events I can hook into - namely Member.BeforeAddGroup and Member.AfterAddGroup as outlined here:

    http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events

    But how can I determine WHAT group the member is about to be (or has just been) added to?   I need to take different actions according to the group.  Do I need to use the 2 event handlers togehter in some way?

  • Markus Johansson 1936 posts 5864 karma points MVP 2x c-trib
    Oct 04, 2011 @ 06:46
    Markus Johansson
    0

    You should be able to use the GroupId-property of the AddGroupEventArgs?

    Something like this:

    void Member_BeforeAddGroup(object sender,AddGroupEventArgs e)
    {
        Int32 groupId = e.GroupId;
        // Yada yada   
    }

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft