Hello,
I have a form submitting some values, but I get a strange behaviour. Just after submitting, I cannot see the delete button. It's visibile when loading the page normally though (GET, !POST).
echo $user." ".$l->createdUser; // always matches
if ($user->isSuperuser() or $user === $l->createdUser) {
echo "<a href='{$_root}delete-item/?proj=$page->id&item=$l->id'>Delete</a>"; // sometimes visibile, sometimes not
}
These are my attempts
echo (int) $user == $l->createdUser; // always true, even if values don't match
echo (int) $user == (int) $l->createdUser; // always true, even if values don't match
echo (int) $user === (int) $l->createdUser; // always true, even if values don't match
echo (int) $user->id === (int) $l->createdUser; // never true
echo $user == $l->createdUser; // usually works correctly, but not just after $user posted something
echo $user === $l->createdUser; // same as previous
Thanks for any suggestion