Answers.Body: <p>You can write a plugin that hooks into <code>civicrm_post</code> that will allow you to do anything you like with the newly-registered contact.</p>
  
  <pre><code>add_action( 'civicrm_post', 'my_do_stuff_after_registration', 10, 4 );
  function my_do_stuff_after_registration( $op, $objectName, $objectId, $objectRef ) {
      if ( $op != 'create' ) return;
      if ( $objectName != 'Participant' ) return;
      $contact_id = $objectRef['contact_id'];
      // ... do anything you like with this contact
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-16T18:26:05.667Z
Answers.LastActivityDate: 2017-11-16T18:26:05.667Z
Answers.UserDisplayName: Christian Wach
Body: <p>Is there a way to perform automated actions when people sign up to events based on their profile info?</p>
  
  <p>For example: 
  - if someone has already attended an event in the last month, put them on the waiting list
  - if someone belongs to a particular organisation, automatically mark them as registered</p>
  
  <p>I'm using Civi 4.2.27 on Wordpress.</p>
  
Tags: <civievent><profile>
Title: Automated contact filtering for event attendees?
ThreadText: # Automated contact filtering for event attendees?
  
  (Asked by: username_0 on 2017-11-15)
  
  Is there a way to perform automated actions when people sign up to events based on their profile info?
  
  For example:
  - if someone has already attended an event in the last month, put them on the waiting list
  - if someone belongs to a particular organisation, automatically mark them as registered
  
  I'm using Civi 4.2.27 on Wordpress.
  
  **Tags:** civievent, profile
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-16. Score: 1 | Accepted answer
  
  You can write a plugin that hooks into `civicrm_post` that will allow you to do anything you like with the newly-registered contact.
  
  ```
  add_action( 'civicrm_post', 'my_do_stuff_after_registration', 10, 4 );
  function my_do_stuff_after_registration( $op, $objectName, $objectId, $objectRef ) {
      if ( $op != 'create' ) return;
      if ( $objectName != 'Participant' ) return;
      $contact_id = $objectRef['contact_id'];
      // ... do anything you like with this contact
  }
  
  ```
  
  
  ---
  
  