Creating a group invitation

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The following sample code shows how you can create an invitation to a group:

 

[C#]

 

using System;

using CMS.Community;

using CMS.UIControls;

 

...

 

        // Create new invitation object

      InvitationInfo ii = new InvitationInfo();

 

      // Set properties

       ii.InvitationComment = "Invitation comment";

       ii.InvitationGroupID = 1;

       ii.InvitationUserEmail = "admin@localhost.local";

       ii.InvitedByUserID = CurrentUser.UserID;

       ii.InvitationCreated = DateTime.Now;

       ii.InvitationValidTo = DateTime.Now.AddDays(1);

 

      // Save object

      InvitationInfoProvider.SetInvitationInfo(ii);

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?creating_a_group_invitation.htm