Spin-off from #935062: Change role id to machine name

No code in Drupal should use those magic numbers.

This should be backported.

Files: 
CommentFileSizeAuthor
#3 drupal-1600892-3.patch8.23 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 39,069 pass(es).
[ View ]
drupal8.role-ids.0.patch7.87 KBsun
PASSED: [[SimpleTest]]: [MySQL] 36,663 pass(es).
[ View ]

Comments

Status:Needs review» Reviewed & tested by the community

Looks good. In a cursory grep for 'roles\[' I didn't catch any others.

Version:8.x-dev» 7.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)

Committed to 8.x. Moving to 7.x.

Status:Patch (to be ported)» Needs review
StatusFileSize
new8.23 KB
PASSED: [[SimpleTest]]: [MySQL] 39,069 pass(es).
[ View ]

Rerolled.

Status:Needs review» Reviewed & tested by the community

Thanks!

Status:Reviewed & tested by the community» Fixed

Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/bbe4b34

-   * @param integer $rid Role id.
...
+   * @param string $rid
+   *   The role ID to search for.

A little odd we're saying that the role ID is supposed to be a string, although in practice I suppose the calling code does tend to pass (numeric) strings to it rather than integers.

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