MDL-69910 calendar: Fix export exception when both params are sent

This commit is contained in:
Brendan Heywood
2020-10-11 09:21:41 +11:00
parent 46000ff13a
commit 0df4a06a97
+1 -1
View File
@@ -18,7 +18,7 @@ if (empty($CFG->enablecalendarexport)) {
$checkuserid = !empty($userid) && $user = $DB->get_record('user', array('id' => $userid), 'id,password');
//allowing for fallback check of old url - MDL-27542
$checkusername = !empty($username) && $user = $DB->get_record('user', array('username' => $username), 'id,password');
if (!$checkuserid && !$checkusername) {
if ((!$checkuserid && !$checkusername) || !$user) {
//No such user
die('Invalid authentication');
}