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

wiki is abusing get_complete_user_data() and username

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            What is the solution Petr?

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

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

            Show
            skodak 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:
                  Fix Release Date:
                  24/Nov/10