Moodle
  1. Moodle
  2. MDL-17228

Admins should be able to see all custom profile fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.4
    • Component/s: General
    • Labels:
      None
    • Environment:
      Any
    • Database:
      Any
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      30259

      Description

      Admins should be able to see all user custom profile fields. If a custom profile field is marked as PROFILE_VISIBLE_PRIVATE, it should be visible to the user but also to admins who have moodle/user:update. Note: Admins can edit the fields but not see them without going into edit.

      Fix:-
      in user/profile/lib.php CHANGE:
      case PROFILE_VISIBLE_PRIVATE:
      return ($this->userid == $USER->id);
      TO:
      case PROFILE_VISIBLE_PRIVATE:
      if ($this->userid == $USER->id) return true;
      // Fall through to default which checks moodle/user:update

      Alan.

        Activity

        Hide
        Eloy Lafuente (stronk7) added a comment -

        It sounds logical (admins should access to everything both in view and edit mode). Assigning to Shane... just in case we are missing something and addressing to 1.9.4. Thanks for report!

        Show
        Eloy Lafuente (stronk7) added a comment - It sounds logical (admins should access to everything both in view and edit mode). Assigning to Shane... just in case we are missing something and addressing to 1.9.4. Thanks for report!
        Hide
        Shane Elliott added a comment -

        I think there was a reason we didn't include it in the view mode, but can't recall what it was. So unless anyone can think of something I'll make the change.

        Show
        Shane Elliott added a comment - I think there was a reason we didn't include it in the view mode, but can't recall what it was. So unless anyone can think of something I'll make the change.
        Hide
        Pierre Pichet added a comment -

        The CVS real address was MDL-17278 sorry...

        Show
        Pierre Pichet added a comment - The CVS real address was MDL-17278 sorry...
        Hide
        Shane Elliott added a comment -

        Finally got to this ... fixed in 1.9 and HEAD. Thanks Alan.

        Show
        Shane Elliott added a comment - Finally got to this ... fixed in 1.9 and HEAD. Thanks Alan.
        Hide
        Petr Škoda added a comment -

        reviewed, thanks

        Show
        Petr Škoda added a comment - reviewed, thanks

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: