Answers.Body: <p>I think a custom plugin is going to be the way to go with this.  Your template code would look something like:</p>
  
  <pre><code>{% set entries = craft.entries.section(‘listing’).authorId(user.id) %}
  
  {% if entries.count &gt;= craft.myPlugin.getEntryLimitForUser(user.id) %}
      No more entries for you!
  {% else %}
      More entries for you!
  {% endif %}
  </code></pre>
  
  <p>Your plugin would also hook onto the <a href="http://buildwithcraft.com/docs/plugins/events-reference#entries-onSaveEntry" rel="nofollow">onSaveEntry</a> event and keep an incrementing entry save counter for each user you're tracking.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-31T12:16:10.850Z
Answers.Text: If anyones interested in achieving this, I have created a little plugin that seems to do the trick, its on Github.
  
  https://github.com/alecritson/Curbed-Craft
Answers.UserDisplayName: Alec Ritson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-27T16:55:25.587Z
Answers.LastActivityDate: 2014-10-27T16:55:25.587Z
Answers.UserDisplayName: Brad Bell
Body: <p>Is there a way to enforce a limit to the amount of entries a user can create based on their user group</p>
  
  <p>I’ve been digging around a little and can’t seem to find anything that would allow this, I’ve looked at adding my own permissions but I don’t think that’s right as I need/want the value to be a number, not a ‘can the user add x amount’ kinda deal.</p>
  
  <p>Something like:</p>
  
  <pre><code>{% set entries = craft.entries.section(‘listing’).authorId(user.id) %}
  
  {% if entries.count &gt;= userGroup.entryLimit %}
      No more entries for you!
  {% else %}
      More entries for you!
  {% endif %}
  </code></pre>
  
  <p>Is the only way to do this by creating a custom plugin?</p>
  
  <p>Thank you!</p>
  
Tags: <entries><user-groups>
Title: Limit amount of entries a user can create based on their user group
ThreadText: # Limit amount of entries a user can create based on their user group
  
  (Asked by: username_0 on 2014-10-27)
  
  Is there a way to enforce a limit to the amount of entries a user can create based on their user group
  
  I’ve been digging around a little and can’t seem to find anything that would allow this, I’ve looked at adding my own permissions but I don’t think that’s right as I need/want the value to be a number, not a ‘can the user add x amount’ kinda deal.
  
  Something like:
  
  ```
  {% set entries = craft.entries.section(‘listing’).authorId(user.id) %}
  
  {% if entries.count >= userGroup.entryLimit %}
      No more entries for you!
  {% else %}
      More entries for you!
  {% endif %}
  
  ```
  
  Is the only way to do this by creating a custom plugin?
  
  Thank you!
  
  **Tags:** entries, user-groups
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-27. Score: 1 | Accepted answer
  
  I think a custom plugin is going to be the way to go with this. Your template code would look something like:
  
  ```
  {% set entries = craft.entries.section(‘listing’).authorId(user.id) %}
  
  {% if entries.count >= craft.myPlugin.getEntryLimitForUser(user.id) %}
      No more entries for you!
  {% else %}
      More entries for you!
  {% endif %}
  
  ```
  
  Your plugin would also hook onto the [onSaveEntry](http://buildwithcraft.com/docs/plugins/events-reference#entries-onSaveEntry) event and keep an incrementing entry save counter for each user you're tracking.
  
  > **Comments:**
  > **username_0**: If anyones interested in achieving this, I have created a little plugin that seems to do the trick, its on Github.  https://github.com/username_0/Curbed-Craft  
  
  ---
  
  