diff --git a/setup.php b/setup.php index 608b80ed..ab513deb 100644 --- a/setup.php +++ b/setup.php @@ -387,7 +387,7 @@ if(isset($_POST['add_database'])){ if(isset($_POST['add_user'])){ $user_count = mysqli_num_rows(mysqli_query($mysqli,"SELECT COUNT(*) FROM users")); - if($user_count !== 0) { + if($user_count < 0) { $_SESSION['alert_message'] = "Users already exist in the database. Clear them to reconfigure here."; header("Location: setup.php?company"); exit; @@ -804,7 +804,7 @@ if(isset($_POST['add_company_settings'])){

Company Details

- + Database config invalid, or users already exist in the database.