I've just added a simple message to be displayed on website.
ie.
session().set("msg", "User Updated");
And then in my content class I have a get_message() function which gets
called from inside a template.
get_message() does simple -
string msg;
if (app().session().is_set("msg")) {
msg = app().session().get("msg"); //works
app().session().erase("msg"); // doesn't work
}
return msg; // always returns text because it never gets erased
Is modifying a session via app().session() not permitted or is it a bug?
Erasing the key from controller works fine.
Another question - why is session_interface::get() not const?
Cheers,
Petr
|