User Data Synchronization (External Source)

Maintained by Hani Ayyoub
Synchronizes Moodle user profile data from an external database table or view.
Price option: Free

Supports Moodle 4.1-5.2 See all versions
Latest release: 1 month ago
Installations: 3
Downloads (last 90 days): 75

Frankenstyle name: local_userdatasync
Local plugins

Description

local_userdatasync

Overview

local_userdatasync is a Moodle local plugin that synchronizes selected Moodle user profile fields from an external database table or view into Moodle user accounts. The plugin is designed for universities, schools, and organizations that maintain user information in institutional systems such as SIS, ERP, HR, or identity management databases and need Moodle user data to remain synchronized automatically.

The plugin supports configurable field mapping, scheduled synchronization tasks, dry-run testing, validation controls, synchronization logging, and external database connectivity using Moodle’s bundled ADOdb library.


Main Features

  • Synchronizes Moodle user profile fields from an external database.

  • Supports Oracle, MySQL/MariaDB, PostgreSQL, and SQL Server external sources.

  • Uses Moodle scheduled tasks for automated synchronization.

  • Configurable local and remote matching fields.

  • Configurable field mappings for Moodle profile fields.

  • Supports selected custom profile fields.

  • Dry-run mode for testing synchronization safely.

  • Optional validation for email addresses and phone numbers.

  • Batch processing and pagination support for large datasets.

  • Synchronization audit and reporting interface.

  • External database connection testing page.

  • Privacy API support for metadata, export, and deletion.

  • Secure identifier validation for external database tables and columns.


Typical Usage Scenarios

This plugin is useful in environments where Moodle user profile data should reflect authoritative institutional systems automatically.

Example scenarios include:

  • Synchronizing student information from a university Student Information System (SIS).

  • Updating staff profile information from an HR database.

  • Synchronizing phone numbers, departments, or institutional profile fields.

  • Maintaining Moodle profile consistency across large organizations.

  • Reducing manual user profile maintenance by administrators.


Supported Moodle Fields

The plugin supports synchronization for standard Moodle profile fields such as:

  • firstname

  • lastname

  • email

  • phone1

  • phone2

  • department

  • institution

It also supports selected custom profile fields through configurable mappings.


External Database Support

The plugin supports external database connections using Moodle’s bundled ADOdb library.

Supported database types include:

  • Oracle (oci8, oci8po)

  • MySQL / MariaDB

  • PostgreSQL

  • Microsoft SQL Server

Administrators can configure:

  • External database type

  • Hostname

  • Database/service name

  • Username and password

  • Source table or view

  • Matching fields

  • Field mappings


Security And Privacy

The plugin includes:

  • Capability-based access control

  • Login protection for admin pages

  • POST-only connection testing

  • Sesskey validation

  • Privacy API metadata and deletion support

  • Safe validation of external identifiers

  • Synchronization audit logging

The plugin is intended to minimize sensitive data exposure and avoids storing unnecessary personal values in synchronization logs.


Scheduled Tasks

The plugin provides scheduled tasks for:

  • User profile synchronization

  • Synchronization log cleanup

Administrators can execute tasks manually through Moodle CLI or allow Moodle cron to process them automatically.


Compatibility

  • Moodle 4.1+

  • Intended for Moodle 4.3, 4.4, 5.0, 5.1, and 5.2

  • Compatible with Moodle-supported PHP versions for these releases


Author

Hani Ayyoub

Lead Developer and Maintainer

Contributors

Awards

Privacy friendly
Automated testing support