Problem/Motivation

The default property for the ID is $id. The only reason to use a different one is for backward compatibility with previous releases, which is what the Node module does, for example, by using $nid as ID property.

This is not the case for the User Restrictions module, which now uses $name for the ID, but it used $urid in Drupal 7.

Proposed resolution

Replace UserRestrictions::$name with UserRestrictions::$id and remove UserRestrictions::id() to use the parent class's method.

Command icon Show commands

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

avpaderno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review

  • avpaderno committed ca98435a on 3.0.x
    Issue #3550704: Replace UserRestrictions::$name with UserRestrictions::$...
avpaderno’s picture

Status: Needs review » Reviewed & tested by the community
avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.