Moodle
  1. Moodle
  2. MDL-33670

A critical typo @ user_get_user_details()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.6
    • Fix Version/s: 2.1.7
    • Component/s: Libraries, Web Services
    • Labels:
      None
    • Rank:
      41664

      Description

      In latest commit: https://github.com/moodle/moodle/commit/d099f4fd0edc4df1bf1781e6478427813bcddcb8

      Code:

          if ($isadmin
            of $currentuser
      

      should be

          if ($isadmin
            or $currentuser
      

      I think it may break web service since function user_get_user_details is called only in user/externallib.php

      I have checked all branches and it affects 2.1 branch only.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          Oh, now I see it.

          Show
          Petr Škoda added a comment - Oh, now I see it.
          Hide
          Petr Škoda added a comment -

          Big thanks for the report!!

          Show
          Petr Škoda added a comment - Big thanks for the report!!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Jason Fowler added a comment -

          Petr, can we please get some testing instructions for this issue?

          Show
          Jason Fowler added a comment - Petr, can we please get some testing instructions for this issue?
          Hide
          Petr Škoda added a comment -

          This is a regression from MDL-31520, it seems that nobody tested it there because there was a fatal error, so test it now using the same instructions.

          Show
          Petr Škoda added a comment - This is a regression from MDL-31520 , it seems that nobody tested it there because there was a fatal error, so test it now using the same instructions.
          Hide
          Jason Fowler added a comment -

          Tested under master and 2.1 as I was confused by the master diff branch and just wanted to be extra careful ...

          Show
          Jason Fowler added a comment - Tested under master and 2.1 as I was confused by the master diff branch and just wanted to be extra careful ...
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Big thanks for the effort. This is now part of Moodle upstream. Let's wait for regressions, yay! LOL

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Big thanks for the effort. This is now part of Moodle upstream. Let's wait for regressions, yay! LOL Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: