Your Moodle version

Authentication: LDAP server (Sync Plus)

Maintained by Picture of University of Ulm University of Ulm, Picture of Alexander Bias Alexander Bias
Moodle authentication method which provides all functionality of auth_ldap, but supports advanced features for the LDAP synchronization script and LDAP authentication.

  • It adds the possibility to the LDAP synchronization script to suspend users which have disappeared in LDAP for a configurable amount of days and delete them only after this grace period (the Moodle core LDAP synchronization script only provides you the option to suspend _or_ delete users which have disappeared in LDAP - MDL-47018).
  • You can prevent the LDAP synchronization script from creating Moodle accounts for all LDAP users if they have never logged into Moodle before (the Moodle core LDAP synchronization script always creates Moodle accounts for all LDAP users - MDL-29249).
  • You can fetch user details from LDAP on manual user creation (MDL-47029).
  • It supports login via email for first-time LDAP logins (Moodle core only supports login via email for existing Moodle users - MDL-46638)
  • It adds several line breaks to the output of the LDAP synchronization script to improve readability (MDL-30589).

See README file for details


Screenshot #0


Picture of University of Ulm
University of Ulm (Lead maintainer)
Picture of Alexander Bias
Alexander Bias: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Alexander Bias
    Tue, May 27, 2014, 2:58 PM
    Dear David, dear Anthony,

    I have added a screenshot with the special section in the settings page.

    Concerning the underscore: Normally, I try to follow Moodle coding guidelines as best as possible. I was not aware that there are problems with underscores in plugin names - quite the contrary, I thought that it would be better to use underscores to separate words than dashes. Perhaps I misunderstood the Frankenstyle guidelines in this particular part. But is there a wiki page where it is mentioned that underscores are prohibited in plugin names?

    Originally, I added the _syncplus suffix to make clear that this is a subplugin for auth_ldap and it does not work without it. And I already have other plugins with underscores in the plugins repository ( and

    To sum it up, I would be willing to change the name to a version without underscores. Unfortunately, we already are at the point that the plugin is in production at some Moodle instances in germany. So, my question is: Is the absence of underscores a must-have or would you be willing to wave the plugin through this time?

    PS: The additions in auth_ldap_syncplus to auth_ldap are minimal. And I think these additional features could simply be included to auth_ldap. For the plugin's "grace period" functionality, there is no tracker item yet, but for the other two of the plugin's functionalities, I already created tracker items on and

  • Picture of David Mudrák
    Tue, May 27, 2014, 3:26 PM
    Thanks for adding the screenshot. As I was trying to explain above - underscore are not prohibited. The only plugin type they can't be used is the Activity module (mod). And that has deep historical reasons dating back to early years of Moodle development. As you know, activity modules are frankenstyle exception in that sense that that do not use the mod_ prefix in many places where other plugins use it (function names, classes names, DB table names, string files etc). If underscore was allowed there and there was an activity module like foo_bar, the Moodle core would have no idea if that means the 'boo' plugin of the 'foo' type or if it is mod_foo_bar. All other modules use prefix so the Moodle core can detect the plugintype correctly (by using the part of the name before the first underscore).

    If your auth plugin is already in production, there is really no need to worry with the renaming. There is no strict policy on this subject and even some core plugins use the underscore in the name. I am going to finish the review of this plugin now. Thanks Alexander.
  • Picture of David Mudrák
    Wed, May 28, 2014, 6:55 PM
    Thanks for submitting this Alexander. I am going to approve the plugin now. I appreciate you designed your plugin so that it inherits as much from the auth_ldap as possible, without copying the code. It is a nice example of customizing standard Moodle behaviour without the need to patch it.

    I found the extended behaviour of your plugin pretty reasonable. Let me encourage you to try and prepare a patch for the core's auth_ldap that would include both your plugin features.

    Said that, runway free and cleared to land. Welcome to Plugins directory!
  • Picture of David Andrew
    Wed, Dec 3, 2014, 12:25 PM
    Firstly This works great.
    I work for a government agency that has recently merged and hence we run 2 AD's at the moment so I am using ldap_syncplus and the default.
    Each can then search against different directories. The 2 domains trust each other and I am using the 1 AD account to search both domains. Is there a problem witht he way I am doing this, and is there a better way?
  • Picture of Alexander Bias
    Wed, Dec 3, 2014, 3:56 PM

    Although the plugin was not developed for scenarios like yours, I see nothing wrong with your setup. You will have two auth plugins which can be configured independently and which use the same functions under the hood.

    The only downside I see is that each Moodle user has the auth plugin to use set in his profile. This means that user A who uses auth_ldap will only be searched in the LDAP Server configured in auth_ldap. There is no possibility to migrate users from one LDAP server to the other LDAP server without changing the auth plugin in Moodle.

    I don't know if there are better solutions for your problem and if auth_ldap can be configured to contact two LDAP servers or if you can configure only one LDAP server in Moodle and this LDAP server hands over the auth request to a second LDAP server if he can't find a user in his directory. Please turn to the Moodle forums if you want to get a better solution.

  • Picture of Esther J
    Mon, Mar 23, 2015, 8:25 PM
    Hi Alex,
    Hope you are well!.
    I have download Ldap plugin and installed via "Install plugins". After successful validation, redirected to "Manage authentication" to enable "LDAP server (Sync Plus)". Upon click of Settings, shows this message " The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled if you want to use this authentication plugin." I have uncommented ldap.dll in php.ini file however error message remains there.

    Additional information,
    2. PHP 5.5.11
    2 phpMyAdmin 4.1.12
    3 Database server - MySql 5.6.16
    4 Apache 2.4.9 

    Plz help to fix this problem.
  • Picture of Alexander Bias
    Mon, Mar 23, 2015, 8:37 PM
    Hi Ester,

    the error message you have posted tells me that your webserver does not have the php-ldap module loaded which is necessary for this plugin. I assume that this is not a problem of our plugin, you probably won't be able to use the Moodle core LDAP authentication, too.

    You say that you have uncommented ldap.dll in php.ini. .dll files correspond to Windows and I am no Windows expert.
    The only thing I can tell you is that on Linux, there must be a line
    in php.ini and this extension file must be installed, of course. Please talk to your webserver admins if they can help you getting this PHP extension running.

  • Picture of Esther J
    Mon, Mar 23, 2015, 9:23 PM
    Hi Alex,

    Thank you for your reply. I will considered this "extension=ldap" when I do/reply in linux.

    To anwser to your question, yes I'm unable to use core LDAP also (has same error message)
  • Picture of Esther J
    Mon, Mar 23, 2015, 9:24 PM
    Hi Alex,

    Thank you for your reply. I will consider this "extension=ldap" when I do/reply in linux.

    To anwser to your question, yes I'm unable to use core LDAP also (has same error message)
  • Picture of Yaoning Tao
    Thu, Jan 28, 2016, 4:08 AM
    Hi Alex

    Thanks for your great works. I'm setting Moodle 3.0.2+ (Build: 20160121) on Centos, and want to use LDAP authentication with Windows 2012 R2 AD. I made same settings for both core LDAP plugin and your plugin. When I did manual sync script, core LDAP can create user, and your plug display result as
    [AUTH LDAP SYNCPLUS] The users sync cron has been deprecated. Please use the scheduled task instead.
    [AUTH LDAP SYNCPLUS] The scheduled task sync_task is enabled, the cron execution has been aborted.
    And there is no user been created at all.

    Could you give me some suggestions about how to troubleshoot?

  • Picture of Alexander Bias
    Thu, Jan 28, 2016, 4:19 AM
    Hi Yaoning Tao,

    I think the message says it all - the manual sync script is still there, but is deprecated because it is replaced with a scheduled task within Moodle.
    If you really want to use the manual script, please go to Site administration > Server > Scheduled tasks and disable the scheduled task for this plugin.

  • Picture of Marc Bonaventura
    Mon, Apr 4, 2016, 9:51 PM
    Hi Alex,

    when adding the plugin, old users created with the standard LDAP plugin still require it to log-in, with new users being fetched from the LDAP repository are created with the new plugin. Is there any way to "move" users from one plugin to another? If not, then none of the plugins can be ever uninstalled without losing the log-in capabilities to users who where imported with that particular plugin.
    In other words: if I disable the standard LDAP plugin, no user that was already in the system can log-in anymore. If I disable the "sync plus" plugin instead, no "new" users that logged in for the first time with this plug-in (higher priority in the authentication list) can log in to the system anymore.

    Otherwise great plugin, looking forward to using it fully smile
  • Picture of Alexander Bias
    Tue, Apr 5, 2016, 2:49 AM

    I think all you need to know is listed on, in the last paragraph of section "Usage & settings".

  • Picture of Sebastian T.
    Thu, May 26, 2016, 5:24 PM
    Hi Guys, thanks for that awesome plugin. Any chance to see LDAP cohort sync for LDAP/AD Groups built into this plugin - it would make it the complete solution especially since the moodle_local_ldap plugin is discontinued and stopped working with MDL 2.8.....
  • Picture of Alexander Bias
    Fri, May 27, 2016, 3:33 AM
    Hi Sebastian,

    well, the features which auth_ldap_syncplus adds over auth_ldap are focused at user account lifecycle management. Adding a cohort sync feature would be out of the scope of this plugin.

    With moodle_local_ldap, you mean ? Well, Patrick Pollet died some time ago as far as I know and that is a pretty good reason why the plugin is discontinued...

    Please have a look at This is a plugin which we have developed for a similar purpose and are already using it in production. It just needs some more features and will then be published shortly in the Moodle plugins repo.

1 2
Please login to post comments