From 0c2b7ce36a01d241a0492d1682d5c84fb37f616c Mon Sep 17 00:00:00 2001 From: Nick Freear Date: Mon, 8 May 2017 11:14:47 +0100 Subject: [PATCH] Bug #5, fix for "dummy" User account ~ `batch = 0` [iet:8853003][ci skip] --- db/User.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/User.php b/db/User.php index ee3df66..3511726 100644 --- a/db/User.php +++ b/db/User.php @@ -186,6 +186,7 @@ protected static function getUserDummy($username) 'lastname' => null, 'email' => null, 'timecreated'=> time(), + 'batch' => 0, 'x_is_dummy' => true, ]; } @@ -242,7 +243,7 @@ public static function getSurveyUrls($profile) $survey_urls = $CFG->auth_ouopenid_survey_urls; - $batch = $profile->batch; + $batch = isset($profile->batch) ? $profile->batch : 0; if (! isset($survey_urls[ $batch ])) { self::debug([ __FUNCTION__, 'error', ]); }