Closed (fixed)
Project:
User Restrictions
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2025 at 11:41 UTC
Updated:
23 Oct 2025 at 06:53 UTC
Jump to comment: Most recent
Currently, when the expiration value is UserRestrictions::NO_EXPIRY (2147483647) the restrictions do not expire, but when the expiration value is 0, the restrictions are considered expired.
Is not possible to get 0 from the datetime form element. It would be better to use 0 for restrictions that do not expire.
Wherever UserRestrictions::NO_EXPIRY is used, replace it with 0.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
avpadernoComment #5
avpadernoComment #8
avpadernoFinally, I decided to use a new property that is set to
TRUEwhen a restriction does not expire. In this way, when a restriction is set to expire, and then as not expiring, the expiring time is preserved, even if it is not used when the restriction does not expire.