How to return user name from vibed session?
Adrian Matoga via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Dec 10 04:21:40 PST 2015
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote:
> Vibed have method get for user session
> http://vibed.org/api/vibe.http.session/SessionStore
>
> I set user name for session like this:
> req.session.set("username", "admin");
>
> But I can't understand how to get user name from it:
>
> abstract std.variant.VariantN!(20) get(
> string id,
> string name,
> lazy std.variant.VariantN!(20) defaultVal
> );
>
> What does every string here mean? Could anybody to show example
> of usage?
I think what you need is Session.get, not SessionStore.get:
http://vibed.org/api/vibe.http.session/Session.get
More information about the Digitalmars-d-learn
mailing list