From fc96f8f12c0400631baff689b5411765d0844809 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 30 Apr 2015 09:52:00 -0500 Subject: [PATCH] Validate user exists - refs #7363 --- main/gradebook/search.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/gradebook/search.php b/main/gradebook/search.php index 31a9bc3c7a..90df63ded0 100644 --- a/main/gradebook/search.php +++ b/main/gradebook/search.php @@ -42,6 +42,12 @@ if ($searchForm->validate()) { } elseif ($userId > 0) { $userInfo = api_get_user_info($userId); + if (empty($userInfo)) { + Session::write('message', Display::return_message(get_lang('NoUser'), 'warning')); + + Header::location(api_get_self()); + } + $courseList = GradebookUtils::getUserCertificatesInCourses($userId, false); $sessionList = GradebookUtils::getUserCertificatesInSessions($userId, false);