Fix remove error message
This commit is contained in:
parent
ab31b191a9
commit
f8743c9487
1 changed files with 6 additions and 7 deletions
|
@ -81,17 +81,16 @@ function remove_identity($mac)
|
|||
if ($identity['mac_hash'] != $hashed_mac) {
|
||||
array_push($new_identities, $identity);
|
||||
}
|
||||
|
||||
}
|
||||
file_put_contents(IDENTITIES_FILE, json_encode($new_identities));
|
||||
|
||||
if (count($identities) > count($new_identities)) {
|
||||
$_SESSION['form_success'] = true;
|
||||
$_SESSION['form_success_message'] = 'Identity successfully removed.';
|
||||
header("Location: " . $url, true, 303);
|
||||
exit();
|
||||
}
|
||||
|
||||
} else {
|
||||
$_SESSION['form_success'] = false;
|
||||
$_SESSION['form_success_message'] = 'Identity not found.';
|
||||
}
|
||||
header("Location: " . $url, true, 303);
|
||||
exit();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue