Skip to content

Commit

Permalink
Fix redirecto to Welcome page if no devices, after logon.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Nov 4, 2024
1 parent cdc2ddd commit 6a924d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/Controllers/Logon.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ public function createForm()
{
$session = session();
if (!empty($session->get('user_id'))) {
return redirect()->to(site_url('summaries'));
$config = new \Config\OpenAudit();
if ($config->device_count === 0) {
return redirect()->to(url_to('welcome'));
} else {
return redirect()->to(url_to('home'));
}
}
$db = db_connect();
$sql = "SELECT * FROM discoveries WHERE id = 1";
Expand Down

0 comments on commit 6a924d9

Please sign in to comment.