Moodle
  1. Moodle
  2. MDL-23317

wiki is abusing get_complete_user_data() and username

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Wiki (2.x)
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      get_complete_user_data() should not be use to fetch user records in normal code - it fetches tons of data and is really slow

      in any case you can not fecth users by username any more because it is not unique, there might be users with the same username from different mnet host!

        Gliffy Diagrams

          Activity

          Hide
          Martin Dougiamas added a comment -

          What is the solution Petr?

          Show
          Martin Dougiamas added a comment - What is the solution Petr?
          Hide
          Petr Skoda added a comment -

          probably $DB->get_record('user', ....)

          Show
          Petr Skoda added a comment - probably $DB->get_record('user', ....)

            People

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

              Dates

              • Created:
                Updated:
                Resolved: