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

Files: 
CommentFileSizeAuthor
#6 1864188-6-user_filters_d7.patch608 bytesjohnshortess
PASSED: [[SimpleTest]]: [MySQL] 39,618 pass(es). View
#2 1864188-1-user_filters_hook_permission.patch628 bytesjohnshortess
PASSED: [[SimpleTest]]: [MySQL] 49,335 pass(es). View

Comments

johnshortess’s picture

Assigned: Unassigned » johnshortess
johnshortess’s picture

Status: Active » Needs review
FileSize
628 bytes
PASSED: [[SimpleTest]]: [MySQL] 49,335 pass(es). View

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
PASSED: [[SimpleTest]]: [MySQL] 39,618 pass(es). View

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.