Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81857

Non-admins cannot view address in user profile field

XMLWordPrintable

    • 1
    • Team Hedgehog 2024 Sprint 2.2

      I think MDL-77468 may have had an unintended consequence of preventing the address field being returned by user_get_user_details().

      I initially discovered this by a webservices API call to core_user_get_users_by_field. When I upgraded from 3.11 to 4.1.10, it stopped returning the address field in the response.

      I think this is because function user_get_user_details() in /user/lib.php now calls get_identity_fields() (in /user/classes/fields.php) in order to determine which fields are returned. This function seems to rely on the showuseridentity setting, which itself can never allow the display of the address (see the setting definition in /admin/settings/users.php) and nor would it be suitable given the main purpose of that setting (the wide use of this setting is also evident in MDL-67738). I am not sufficiently familiar with the Moodle code and settings to know how to change this.

            pholden Paul Holden
            JohnPercival John Percival
            Raquel Ortega Raquel Ortega
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 20 minutes
                1h 20m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.