MDL-2414 - using quotes in enrolment keys failed due to slashes.

merged from MOODLE_19_STABLE
This commit is contained in:
poltawski 2007-12-28 12:36:33 +00:00
parent 1e3eee5fe8
commit 89a643b0fa

View File

@ -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;
}
}