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

auth_sync_users() only knows mysql and postgres

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8, 1.9
    • 1.7
    • Authentication
    • None
    • Microsoft SQL, Oracle
    • MOODLE_17_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      auth_sync_users() in auth/ldap/lib.php needs to create a temporary table so that it can quickly determine which external ldap accounts exist or don't exist in moodle. The code currently only knows how to create temporary tables for mysql and postgres. This patch should add support for doing it in mssql and oracle. A few comments:

      -this is my first patch submission attempt so go easy on me, I'd really appreciate constructive criticism
      -I looked but was unable to find a way to abstract the temporary table creation with adodb, if anyone knows of a way, it would be much prettier than the switch case statement I have now. As it stands, this will need updating with every new database system moodle supports.
      -It seemed to me that mssql was not dropping the temporary table when I ran the script multiple times within a few minutes of each other so I added the DROP table command at the end to be sure each run would be working with fresh data.

            skodak Petr Skoda
            jlee@pbu.edu Jay Lee (Inactive)
            Nobody Nobody (Inactive)
            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.