Skip to content

Commit 412b436

Browse files
jwcataudjarran
authored andcommitted
Suppress warnings on Status page if configured robot user's id/username
doesn't exist yet or is renamed to a username that doesn't exist.
1 parent 304e025 commit 412b436

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@
7171
$eta = floor($duration / $progress + $crawlstart);
7272

7373
$robot = $DB->get_record('user', ['username' => $config->botusername]);
74+
if (!$robot) {
75+
$robot = new stdClass();
76+
$robot->id = get_string('botusermissing', 'tool_crawler');
77+
$robot->username = get_string('botusermissing', 'tool_crawler');
78+
}
7479

7580
$table = new html_table();
7681
$table->head = [get_string('robotstatus', 'tool_crawler')];

0 commit comments

Comments
 (0)