Hi!
I create an event receiver exactly like this link http://www.c-sharpcorner.com/UploadFile/40e97e/create-site-automatically-when-a-list-item-is-added/
but I don't know how to grant permission on the new subsite for users listed on Team Menbers fields in Custom List "Projects"
Can someone help me with code please
Thankss
Manesh GolekarPosted Jul 3, 2014, 6:24 PM
U can add user to any gorup in new sub site using below , user will automatically get group permisisons
SPUser user = subweb.EnsureUser(<>);
if (user != null)
{
SPGroup group = subweb.Groups[userGroupName];
if (group != null)
group.AddUser(user);
}