mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-2414 - using quotes in enrolment keys failed due to slashes.
merged from MOODLE_19_STABLE
This commit is contained in:
parent
1e3eee5fe8
commit
89a643b0fa
@ -146,7 +146,7 @@ function check_entry($form, $course) {
|
||||
|
||||
$groupid = $this->check_group_entry($course->id, $form->password);
|
||||
|
||||
if (($form->password == $course->password) or ($groupid !== false) ) {
|
||||
if ((stripslashes($form->password) == $course->password) or ($groupid !== false) ) {
|
||||
|
||||
if (isguestuser()) { // only real user guest, do not use this for users with guest role
|
||||
$USER->enrolkey[$course->id] = true;
|
||||
@ -191,7 +191,7 @@ function check_group_entry ($courseid, $password) {
|
||||
$ingroup = false;
|
||||
if (($groups = groups_get_all_groups($courseid))) {
|
||||
foreach ($groups as $group) {
|
||||
if ( !empty($group->enrolmentkey) and ($password == $group->enrolmentkey) ) {
|
||||
if ( !empty($group->enrolmentkey) and (stripslashes($password) == $group->enrolmentkey) ) {
|
||||
$ingroup = $group->id;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user