danmarsden / moodle-auth_mcae

replaced by https://github.com/catalyst/moodle-local_cohortauto
https://github.com/catalyst/moodle-local_cohortauto
8 stars 12 forks source link

incompatible with the "login as" administration function #2

Closed fvendrell closed 11 years ago

fvendrell commented 11 years ago

Problem of comptabilty betwen mcae, Email based self registration and the "login as" administration function.

The following code is incompatible with the "login as" administration function.

<?php

global $SESSION, $USER;

if ($USER->id != 0) { // Only for autenticated users
    $mcae = get_auth_plugin('mcae'); //Get mcae plugin

    if (isset($SESSION->mcautoenrolled)) {
        if (!$SESSION->mcautoenrolled) {
            $mcae->user_authenticated_hook($USER,$USER->username,""); //Autoenrol if mcautoenrolled FALSE
        }
    } else {
        $mcae->user_authenticated_hook($USER,$USER->username,""); //Autoenrol if mcautoenrolled NOT SET
    }
}

?>
kamat commented 11 years ago

Plugin didn`t work with "login as" function. Use the "User bulk editor" plugin https://github.com/kamat/user_bulk_editor https://moodle.org/plugins/view.php?plugin=local_user_bulk_editor