Wrong use of accountFromProxy()

Created on 27 December 2021, about 3 years ago
Updated 7 November 2023, about 1 year ago

Problem/Motivation

In the assignedLanguages() and hasPermissionForLanguage() functions there is a wrong use of the accountFromProxy(), $this->currentUser is passed instead of $account, so we got the current user languages/permissions instead of the target user languages/permissions.

Steps to reproduce

As admin:

  1. Edit a user and set an allowed language
  2. Save
  3. Re-edit the user: the allowed language is not set because the admin permissions are loaded instead of the edited user permissions
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇹Italy grimal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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