cannod / moodle-drupalservices

Moodle plugin to connect to Drupal services
36 stars 25 forks source link

User doesn't log out from Drupal when Moodle Logout happens #49

Closed alez-k closed 9 years ago

alez-k commented 9 years ago

Problem

In 2.x-2.x, when user logs out from moodle, he doesn't log out from drupal although the relate option is set.

Supposed motivation

I've found a bug in the code, in auth.php line 233

function logoutpage_hook()
{
    [...]
    if ($drupalsession=$this->get_drupal_session() ) {
        if (get_config('call_logout_service', 'auth_drupalservices')) {
        [...]

the get_config params are written in inverted order (moodle 2.8), so it always skips the condition.

netw3rker commented 9 years ago

I've created a branch & a pull request for this. If you could test it out and confirm that it fixes your problem that would be great! Thanks for tracking this down.

alez-k commented 9 years ago

I've tested it and I confirm that it fixes the problem. Thanks!

netw3rker commented 9 years ago

great! fixed and merged. thanks for pointing it out!