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) {
|
if ($identity['mac_hash'] != $hashed_mac) {
|
||||||
array_push($new_identities, $identity);
|
array_push($new_identities, $identity);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
file_put_contents(IDENTITIES_FILE, json_encode($new_identities));
|
||||||
|
|
||||||
file_put_contents(IDENTITIES_FILE, json_encode($new_identities));
|
if (count($identities) > count($new_identities)) {
|
||||||
|
|
||||||
$_SESSION['form_success'] = true;
|
$_SESSION['form_success'] = true;
|
||||||
$_SESSION['form_success_message'] = 'Identity successfully removed.';
|
$_SESSION['form_success_message'] = 'Identity successfully removed.';
|
||||||
header("Location: " . $url, true, 303);
|
} else {
|
||||||
exit();
|
$_SESSION['form_success'] = false;
|
||||||
|
$_SESSION['form_success_message'] = 'Identity not found.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION['form_success'] = false;
|
|
||||||
$_SESSION['form_success_message'] = 'Identity not found.';
|
|
||||||
header("Location: " . $url, true, 303);
|
header("Location: " . $url, true, 303);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue