Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have to update some list whenever a new user or group is added to the site.

Is there any event receiver available for users/groups?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

There is no event receiver for users or user groups. So you'll have to create a timer job and do the checking for new groups yourselvers.

Or you can add some javascript to a delegate control (AdditionalPageHead) which checks for the current page being _layouts/newgrp.aspx and if it is hooks the clicked event of ctl00_PlaceHolderMain_ctl06_RptControls_btnOK to fire off an AjaxCall to your code.

share|improve this answer
    
Which button id it is "ctl00_PlaceHolderMain_ctl06_RptControls_btnOK" Also i am not going to add the user group through UI. Doing through code. –  MarsMan Apr 10 '12 at 9:38
1  
That button id is the create button on the newgrp page, but I admit it's a hack to use. It's only if you need to run your code fast when a group is created through the UI. If you create the groups using code, then why not run your code in there or add a SPWorkItem for a timer job you create. –  Per Jakobsen Apr 10 '12 at 10:31
add comment

You have to donwload the SharePoint 2010 Event Manager, then in the user Assign your Assymbly(Event Receiver) to the User Information List of your site and Test!!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.