Authentication: Drupal Services

Maintained by Picture of chris porterchris porter
Provides session based SSO (Single Sign On) service between Moodle and Drupal. As well as user synchronization capability to import and update users from the Drupal user database. This work is based off the original work of Scott Schaffter and Arsham Skrenes and their module from moodle 1.9
75 sites
11 fans
Current versions available: 1

Provides session based SSO (Single Sign On) service between Moodle and Drupal. As well as user synchronization capability to import and update users from the Drupal user database. This work is based off the original work of Scott Schaffter and Arsham Skrenes and their module from moodle 1.9


Picture of chris porter
chris porter (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of chris porter
    Wed, Dec 3, 2014, 11:10 PM
    Tomek's feedback was great, he's a good dude. I rolled in fixes for all of the relevant changes yesterday, and those changes are now part of both master, and the 2.x-2.x-dev release of the module. I think the documentation is pretty solid, there are a number of testers in the github issue queue for this fork, and the installation process is by design much easier now.

    David is right that the goal of a code review isn't to get a product to a perfect state, its to be sure it's written in the correct way, uses the right API's and won't expose users to security risks etc. Once publicly available to the community, those users will help identify the actual issues surrounding this code, and it'll be my (and any co-maintainers) job to resolve that quickly.
  • Picture of David Mudrák
    Thu, Dec 4, 2014, 4:25 PM
    Thanks Chris. May I ask for uploading the new version ZIP to this plugin directory then? Note that you can use our Github repository in the filepicker to fetch the current branch and/or tagged version from Github directly. I'll be happy to approve this plugin once I get a confirmation from Tomek that the runway is free.
  • Picture of chris porter
    Sat, Dec 6, 2014, 12:55 AM
    I created a new release (alpha 2) for you guys to review. The module is shaping up nicely, and the testers that currently use this module have done a really good job of shaking out bugs so far.
  • Picture of Tomasz Muras
    Thu, Dec 11, 2014, 5:51 AM
    I've run it by our checklist - it's good to go for approval.

    FYI Chris:
    in sync_users(), this can't work:
    foreach ($userlist as $uid) {...
    because $userlist is not defined before that.
  • Picture of chris porter
    Thu, Dec 11, 2014, 6:07 AM
    Sweet! thanks guys. re sync_users() yeah thats for some old cohort sync stuff that is being refactored / removed right now. It's sort of in there more as a reminder/ prompt for the other contributors to jump on.
  • Picture of Ade Oduye
    Tue, Aug 11, 2015, 6:38 AM
    Hey guys, I hope someone can help me.

    Using this plugin, I've followed this tutorial at

    It all seems to work except that moodle loads to the edit-profile page expecting firstname, lastname etc input from the user who just logged in to drupal.

    I explain it with images at

    Please help. Desperation levels steadily increasing.
  • Picture of John Anderson
    Fri, Aug 14, 2015, 10:21 PM
    Hi, is there a version for 2.9 in the works? Or is there a way I could edit the version to get it installed for 2.9?
  • Picture of Benjamin Young
    Fri, Jan 15, 2016, 6:07 AM
    I did a test installing the plugin on Moodle version 3.0.1 running PHP 7 and after the install completed the site just stalls. Sorry I was not able to capture more information about the error with debugging as I had to remove it to get the site running again. Hope this information helps to bring the plugin up to Moodle version 3.0.x.
  • Picture of Max Paultre
    Fri, Mar 11, 2016, 8:13 PM
    I also installed the plugin for Moodle 3.0 on the same server as a OpenAtrium 2 on Drupal 7 and having some trouble getting the SSO to work properly. SSO is an integral feature in our setup, has anyone got it working with Moodle 3 and Drupal 7? Should we downgrade to an older version of Moodle?
  • Picture of Aaron Bookvich
    Thu, Nov 3, 2016, 11:29 PM
    Is there a way to get this plugin to work with Moodle 3.1?
  • Picture of Amruta Jamale
    Wed, Mar 7, 2018, 7:38 PM
    Hi Chris,

    Is there any upgraded version of drupal services which will work on moodle 3.2?
    I want to integrate moodle 3.2 with drupal 7.0, but didn't find any upgraded plugin.
    So can you please guide me to achieve this integration. Is there any other way to integrate instead of drupal services plugin?
    Currently I am being able to see the moodle course list in drupal but when the student clicks on the course he must login to see the course content, whereas I want to see the course directly(SSO).
  • Picture of chris porter
    Wed, Mar 7, 2018, 10:32 PM
    @Amruta Jamale There is. Checkout our github repository for the latest version(s) and file any issues there!
  • Picture of Zigma Zig
    Mon, Jun 18, 2018, 2:12 PM
    I managed to make a fork of the code and fix a php 7.1 issue and made it work in Drupal 7 and moodle 3.2

    to make the login and logout "in-sync" when drupal login happens,

    1.) I simply wrote an JavaScript AJAX in drupal to invoke "http://localhost/moodle/my/" , this made the session auto initiate
    2.) I simply wrote another JavaScript AJAX in drupal to invoke POST to "http://localhost/moodle/login/logout.php?sesskey="
    3.) I modified the moodle logout URL to drupal logout url "http://localhost/user/logout" which will auto trigger the AJAX
    4.) I have disabled the normal login authentication method in moodle so that no one can register or do explicit authentication with moodle.

    Then it works
  • Picture of chris porter
    Tue, Jun 26, 2018, 12:16 AM
    @Zigma Zig, Thanks for contributing! If possible, lets try to avoid promoting forks though. It would be great if this issue could be opened in the github system and we coordinate how to make this work. FWIW, this sounds a lot like the functionality in the 3.x line of the module.
  • Picture of Jack Few
    Sat, Oct 19, 2019, 4:47 PM
    Hello, I couldn't get this to work between Moodle 3.7 and Drupal 8. Please advise!
1 2
Please login to post comments