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

Duplicate entries in the custom user fields

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.9.8
    • Authentication
    • None
    • Debian lenny standard, Apache2, php5, Mysql-cluster from Mysql
    • MySQL
    • MOODLE_19_STABLE

      When doing the authentication via an external db with custom fields users that change their infos in the external DB result in duplicate entries in the custom fields.

      SOLUTION
      FILE lib/moodlelib.php ($Id: moodlelib.php,v 1.960.2.132 2009/05/15 07:22:23 skodak Exp $)
      function: update_user_record
      action: before actually inserting the new record, deletes the old (line 2977)

      delete_records('user_info_data', 'userid', $oldinfo->id, 'fieldid', $infofield->id);

      action: adding a unique index on table user_info_data with userid and fieldid (ahem... I did it straight in the DB ) to prevent duplicate entries.

            moodle.com Moodle HQ
            deligant Christian Deligant
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.