Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synchronize_user_enrolments toggles rocket chat group membership #118

Open
almanesa opened this issue Dec 21, 2021 · 0 comments
Open

synchronize_user_enrolments toggles rocket chat group membership #118

almanesa opened this issue Dec 21, 2021 · 0 comments

Comments

@almanesa
Copy link

If the user is already a member of the group, calling this function would remove him from the group.
These lines should be removed as it does nothing useful.

if (isset($rocketchatuser)
&& array_key_exists($rocketchatuser->username, $rocketchatmembers)
&& $rocketchatuser->username) {
if ($rocketchatuser->username != get_config('mod_rocketchat', 'apiuser')
&& $rocketchatuser->id != get_config('mod_rocketchat', 'apiuser')) {
$rocketchatapimanager->unenrol_user_from_group($courseenrolment->rocketchatid, $rocketchatuser);
}
}

This function only maps active course enrollments to rocket chat group membership in one way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant