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

auth_sync_users() only knows mysql and postgres

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8, 1.9
    • Component/s: Authentication
    • Labels:
      None
    • Environment:
    • Database:
      Microsoft SQL, Oracle
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              jlee@pbu.edu Jay Lee
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07