Problem/Motivation

While debugging this notice:

Notice: Undefined index: uid in nodeaccess_insert_user_reference() (line 937 of nodeaccess/nodeaccess.module).

I realized the values from field_get_items()
return in this format:

$user_uids = [
  '0' => ['uid' => 12345],
  '1' => ['uid' => 12346],
]

and user_load_multiple()
expects them to be:

$user_uids = [
  '0' => 12345,
  '1' => 12346,
]

Proposed resolution

Flatten the multidimentional field array.

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

StatusFileSize
new1.19 KB
joelpittet’s picture

Status: Active » Needs review
d.fisher’s picture

Status: Needs review » Postponed (maintainer needs more info)

Drupal 7 security support has ended as of 5 January 2025.

We are doing some housekeeping on the nodeaccess issue queue and moving all Drupal 7 issues to "postponed (maintainer needs more info)". See https://www.drupal.org/project/nodeaccess/issues/3516593.

If this issue persists on the latest dev branch of nodeaccess (2.0.x-dev) then please feel free to comment and we will change the version against this issue. If we do not hear any feedback within 2 weeks (9th October 2025) we will go ahead and close this issue as outdated.

Thank you.

d.fisher’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

As per the above, as there has been no response we will now close this issue as outdated.

If this issue persists on the latest dev branch of nodeaccess (2.0.x-dev) then please feel free to update the version on this issue and reopen it.

Thank you.

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.