mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-22787 Fixed remote unenrol - blame copy & paste
This commit is contained in:
parent
f70207bc15
commit
de5b395861
@ -257,7 +257,7 @@ class enrol_mnet_mnetservice_enrol {
|
||||
|
||||
if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
|
||||
try {
|
||||
$enrol->enrol_user($instance, $user->id, $instance->roleid, time());
|
||||
$enrol->unenrol_user($instance, $user->id);
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new mnet_server_exception(5020, 'couldnotunenrol', 'enrol_mnet', $e->getMessage());
|
||||
@ -275,7 +275,7 @@ class enrol_mnet_mnetservice_enrol {
|
||||
|
||||
if ($DB->record_exists('user_enrolments', array('enrolid'=>$instance->id, 'userid'=>$user->id))) {
|
||||
try {
|
||||
$enrol->enrol_user($instance, $user->id, $instance->roleid, time());
|
||||
$enrol->unenrol_user($instance, $user->id);
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new mnet_server_exception(5020, 'couldnotunenrol', 'enrol_mnet', $e->getMessage());
|
||||
|
Loading…
x
Reference in New Issue
Block a user