Validate function params

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 19fe5fc533
commit c771bb9dd7
  1. 9
      main/inc/lib/sessionmanager.lib.php

@ -2776,17 +2776,16 @@ class SessionManager
$session_id = api_get_session_id();
}
if (empty($session_id)) {
return false;
}
if (!empty($courseId)) {
$courseId = intval($courseId);
} else {
$courseId = api_get_course_id();
}
if (empty($session_id) || empty($courseId) || empty($user_id)) {
return false;
}
// Table definition
$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);

Loading…
Cancel
Save