Skip to main content
edited tags
Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
edited tags
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

I'm creating a membership-based site in D7, using Date, Calendar, and Entity Registration (which was very easy to setup). Only authenticated users may register for an event.

I'm trying to limit the number of events an authenticated user may register for during a certain time period (probably by month or by quarter), and I'm stuck. I created a field called 'Registration Count' for user accounts. And I created a rule that increments the counter when the user registers for an event.

But I'm trying to figure out:

  1. How do I prevent a registration based on the user's current registration count? I got as far as creating a rule that is triggered prior to a registration and checked his current registration count. And I can display a warning, but the registration still goes through. Isn't there an action I can assign that would halt the registration?
  2. How can I reset the registration counter field for all user accounts back to zero at a certain interval? I can't find access to user fields on that broad level.

Adding more details:

I have a node type called "Event". My registrations are entities. This is out-of-the-box functionality for the Entity Registration module, and it was very simple to get it up and running.

Each user has a field called field-registration-count. When a user registers for an event, I have a rule set up as follows:

  1. Event: After saving a new registration
  2. Action: Set value site:current-user:field-registration-count, add offset 1. This increments the user's registration count by 1.

I have another rule:

  1. Event: Before saving a registration
  2. Condition: site:current-user:field-registration-count > 2
  3. Actions: Page redirect, and then Show a Message on Site

On the third registration, the page redirect happens as expected, and the message is displayed, but the registration is still saved. Based on the provided event named "Before Registration", I think I'm tapping in a the right time; I just can't find an action to cancel the registration itself

Note: When a user actually registers, it doesn't create a node. The Entity Registration module creates an entity type instead, and each registration is an entity.

I'm creating a membership-based site in D7, using Date, Calendar, and Entity Registration. Only authenticated users may register for an event.

I'm trying to limit the number of events an authenticated user may register for during a certain time period (probably by month or by quarter), and I'm stuck. I created a field called 'Registration Count' for user accounts. And I created a rule that increments the counter when the user registers for an event.

But I'm trying to figure out:

  1. How do I prevent a registration based on the user's current registration count? I got as far as creating a rule that is triggered prior to a registration and checked his current registration count. And I can display a warning, but the registration still goes through. Isn't there an action I can assign that would halt the registration?
  2. How can I reset the registration counter field for all user accounts back to zero at a certain interval? I can't find access to user fields on that broad level.

Adding more details:

I have a node type called "Event". My registrations are entities. This is out-of-the-box functionality for the Entity Registration module, and it was very simple to get it up and running.

Each user has a field called field-registration-count. When a user registers for an event, I have a rule set up as follows:

  1. Event: After saving a new registration
  2. Action: Set value site:current-user:field-registration-count, add offset 1. This increments the user's registration count by 1.

I have another rule:

  1. Event: Before saving a registration
  2. Condition: site:current-user:field-registration-count > 2
  3. Actions: Page redirect, and then Show a Message on Site

On the third registration, the page redirect happens as expected, and the message is displayed, but the registration is still saved. Based on the provided event named "Before Registration", I think I'm tapping in a the right time; I just can't find an action to cancel the registration itself

I'm creating a membership-based site in D7, using Date, Calendar, and Entity Registration (which was very easy to setup). Only authenticated users may register for an event.

I'm trying to limit the number of events an authenticated user may register for during a certain time period (probably by month or by quarter), and I'm stuck. I created a field called 'Registration Count' for user accounts. And I created a rule that increments the counter when the user registers for an event.

But I'm trying to figure out:

  1. How do I prevent a registration based on the user's current registration count? I got as far as creating a rule that is triggered prior to a registration and checked his current registration count. And I can display a warning, but the registration still goes through. Isn't there an action I can assign that would halt the registration?
  2. How can I reset the registration counter field for all user accounts back to zero at a certain interval? I can't find access to user fields on that broad level.

Adding more details:

I have a node type called "Event". My registrations are entities. This is out-of-the-box functionality for the Entity Registration module, and it was very simple to get it up and running.

Each user has a field called field-registration-count. When a user registers for an event, I have a rule set up as follows:

  1. Event: After saving a new registration
  2. Action: Set value site:current-user:field-registration-count, add offset 1. This increments the user's registration count by 1.

I have another rule:

  1. Event: Before saving a registration
  2. Condition: site:current-user:field-registration-count > 2
  3. Actions: Page redirect, and then Show a Message on Site

On the third registration, the page redirect happens as expected, and the message is displayed, but the registration is still saved. Based on the provided event named "Before Registration", I think I'm tapping in a the right time; I just can't find an action to cancel the registration itself

Note: When a user actually registers, it doesn't create a node. The Entity Registration module creates an entity type instead, and each registration is an entity.

edited tags
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

I'm creating a membership-based site in D7, using Date, Calendar, and Entity RegistrationEntity Registration. Only authenticated users may register for an event.

I'm trying to limit the number of events an authenticated user may register for during a certain time period (probably by month or by quarter), and I'm stuck. I created a field called 'Registration Count' for user accounts. And I created a rule that increments the counter when the user registers for an event.

But I'm trying to figure out:

  1. How do I prevent a registration based on the user's current registration count? I got as far as creating a rule that is triggered prior to a registration and checked his current registration count. And I can display a warning, but the registration still goes through. Isn't there an action I can assign that would halt the registration?
  2. How can I reset the registration counter field for all user accounts back to zero at a certain interval? I can't find access to user fields on that broad level.

Adding more details:

I have a node type called "Event". My registrations are entities. This is out-of-the-box functionality for the Entity Registration module, and it was very simple to get it up and running.

Each user has a field called field-registration-count. When a user registers for an event, I have a rule set up as follows:

  1. Event: After saving a new registration
  2. Action: Set value site:current-user:field-registration-count, add offset 1. This increments the user's registration count by 1.

I have another rule:

  1. Event: Before saving a registration
  2. Condition: site:current-user:field-registration-count > 2
  3. Actions: Page redirect, and then Show a Message on Site

On the third registration, the page redirect happens as expected, and the message is displayed, but the registration is still saved. Based on the provided event named "Before Registration", I think I'm tapping in a the right time; I just can't find an action to cancel the registration itself

I'm creating a membership-based site in D7, using Date, Calendar, and Entity Registration. Only authenticated users may register for an event.

I'm trying to limit the number of events an authenticated user may register for during a certain time period (probably by month or by quarter), and I'm stuck. I created a field called 'Registration Count' for user accounts. And I created a rule that increments the counter when the user registers for an event.

But I'm trying to figure out:

  1. How do I prevent a registration based on the user's current registration count? I got as far as creating a rule that is triggered prior to a registration and checked his current registration count. And I can display a warning, but the registration still goes through. Isn't there an action I can assign that would halt the registration?
  2. How can I reset the registration counter field for all user accounts back to zero at a certain interval? I can't find access to user fields on that broad level.

Adding more details:

I have a node type called "Event". My registrations are entities. This is out-of-the-box functionality for the Entity Registration module, and it was very simple to get it up and running.

Each user has a field called field-registration-count. When a user registers for an event, I have a rule set up as follows:

  1. Event: After saving a new registration
  2. Action: Set value site:current-user:field-registration-count, add offset 1. This increments the user's registration count by 1.

I have another rule:

  1. Event: Before saving a registration
  2. Condition: site:current-user:field-registration-count > 2
  3. Actions: Page redirect, and then Show a Message on Site

On the third registration, the page redirect happens as expected, and the message is displayed, but the registration is still saved. Based on the provided event named "Before Registration", I think I'm tapping in a the right time; I just can't find an action to cancel the registration itself

I'm creating a membership-based site in D7, using Date, Calendar, and Entity Registration. Only authenticated users may register for an event.

I'm trying to limit the number of events an authenticated user may register for during a certain time period (probably by month or by quarter), and I'm stuck. I created a field called 'Registration Count' for user accounts. And I created a rule that increments the counter when the user registers for an event.

But I'm trying to figure out:

  1. How do I prevent a registration based on the user's current registration count? I got as far as creating a rule that is triggered prior to a registration and checked his current registration count. And I can display a warning, but the registration still goes through. Isn't there an action I can assign that would halt the registration?
  2. How can I reset the registration counter field for all user accounts back to zero at a certain interval? I can't find access to user fields on that broad level.

Adding more details:

I have a node type called "Event". My registrations are entities. This is out-of-the-box functionality for the Entity Registration module, and it was very simple to get it up and running.

Each user has a field called field-registration-count. When a user registers for an event, I have a rule set up as follows:

  1. Event: After saving a new registration
  2. Action: Set value site:current-user:field-registration-count, add offset 1. This increments the user's registration count by 1.

I have another rule:

  1. Event: Before saving a registration
  2. Condition: site:current-user:field-registration-count > 2
  3. Actions: Page redirect, and then Show a Message on Site

On the third registration, the page redirect happens as expected, and the message is displayed, but the registration is still saved. Based on the provided event named "Before Registration", I think I'm tapping in a the right time; I just can't find an action to cancel the registration itself

added 992 characters in body
Source Link
Mark
  • 133
  • 1
  • 1
  • 5
Loading
Source Link
Mark
  • 133
  • 1
  • 1
  • 5
Loading