user_filters() shows permission machine names rather than human labels, and tries to translate them

Created on 29 March 2013, over 11 years ago
Updated 17 April 2024, 8 months ago
    if ($permissions = $function('permission')) {
      asort($permissions);
      foreach ($permissions as $permission => $description) {
        $options[t('@module module', array('@module' => $module))][$permission] = t($permission);
      }

$permission is the permission machine name. We don't show that anywhere else in the UI, so we shouldn't show it here.

Furthermore, we shouldn't be trying to translate it!

hook_permission() provides us with the $description['label'], which comes already translated.

🐛 Bug report
Status

Needs work

Version

7.0 ⚰️

Component
User module 

Last updated about 11 hours ago

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024