Skip to content

Commit 4634c58

Browse files
committed
Merge branch 'danbarretodev-7125' into 1.9.x
2 parents 26ca82f + f2ca4e4 commit 4634c58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main/course_home/course_home.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@
142142
if ($is_speacialcourse) {
143143
$autoreg = Security::remove_XSS($_GET['autoreg']);
144144
if ($autoreg == 1) {
145-
CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT);
145+
if (CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT)) {
146+
Session::write('is_allowed_in_course', true);
147+
}
146148
}
147149
}
148150
if (isset($_GET['action']) && $_GET['action'] == 'subscribe') {

0 commit comments

Comments
 (0)