http://api.drupal.org/api/drupal/core!modules!user!user.module/function/...

  foreach (module_implements('permission') as $module) {
    $function = $module . '_permission';
    if ($permissions = $function('permission')) {

should be

  foreach (module_implements('permission') as $module) {
    $function = $module . '_permission';
    if ($permissions = $function()) {

Exists back to d7, introduced in #334030: replace module_list with module_implements when calling a hook

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnshortess’s picture

Assigned: Unassigned » johnshortess
johnshortess’s picture

Status: Active » Needs review
FileSize
628 bytes

I think this should fix it.

marvin_B8’s picture

sry tested and everything nice

hefox’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me

Dries’s picture

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

Committed to 8.x. Sounds like this needs to be backported to 7.x.

johnshortess’s picture

Status: Patch (to be ported) » Needs review
FileSize
608 bytes

And here's a patch for D7.

marvin_B8’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, no problems.

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Fun stuff. Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/5c9c9a6

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