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
    • Rank:
      27132

      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!

        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 Škoda added a comment -

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

        Show
        Petr Škoda 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: