Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I attempt to limit by role, I can't limit authenticated users.
When I attempt to limit by role, I can't limit authenticated users.
Comments
Comment #1
DuaelFrAuthenticated users is a virtual role.
In the 6.x branch this was not possible too.
When I will have end basic D7 port I will try to find a way to do this.
Comment #2
NathanM CreditAttribution: NathanM commentedsubscribing
Comment #3
mrtoner CreditAttribution: mrtoner commentedSo that I understand the issue before upgrading to D7, the problem is simply that an authenticated user with no additional roles assigned cannot have a limit set? And if I assign an additional role to each authenticated user Node Limits will work?
Comment #4
infines CreditAttribution: infines commentedCorrect.
Comment #5
mrtoner CreditAttribution: mrtoner commentedThank you!
Comment #6
kimadactyl CreditAttribution: kimadactyl commentedHmm - I've done this using Rules, and I'm still getting the "Cannot create content" error.
Comment #7
kimadactyl CreditAttribution: kimadactyl commentedWhoops - never mind, I didn't have role node limits enabled!
So, as a temporary fix:
1. Install Rules module
2. Create a new rule, triggered "after saving a new user account"
3. In Actions add your new role to the user
Works a treat!
Comment #8
Liliplanet CreditAttribution: Liliplanet commentedhmm that's kind of deal breaker as authenticated role is the system role in Drupal.
Is it perhaps possible to 'negate' role selection, so 'if user is not custom role'? which will then default to authenticated ..
Most appreciate any reply and thank you :)
Comment #9
DuaelFrThe fact is that "Authenticated user" role is virtual.
When a new user is created, this role is not affected to him in the database. So, this module have to handle anonymous and authenticated users as exceptions and not as the common case.
I will try to work on node_limit today. This would not be so hard to code.
Comment #10
Liliplanet CreditAttribution: Liliplanet commentedThank you so much DuaelFR!
Comment #11
DuaelFrOnce again I did not find the time :/
Maybe on today or monday. Keep hope ;)
Comment #12
mrtoner CreditAttribution: mrtoner commented@Liliplanet: There are several modules that allow you to automatically set a role for a new user. This current limitation of Node Limit need not be a deal-breaker unless you want it to be.
Resetting priority to major, since the project is not unusable with this workaround. Resetting status to active, since no patch has been submitted.
Comment #13
Liliplanet CreditAttribution: Liliplanet commentedthank you mrtoner for re-opening this issue, yes have been waiting patiently, would love the ability to add nodes as an authenticated + specific defined role :)
Comment #14
DuaelFrA patch has been pushed to dev version
http://drupalcode.org/project/node_limit.git/commit/6e8f1a1
Comment #15
infines CreditAttribution: infines commentedComment #16
DuaelFr