Why not use logUserIdIn, logUserIn, logoutCurrentUser/logUserOut(), and 
currentUserId, and currentUser?

-------------------------------------
E. Biggs<tacoban...@gmail.com> wrote:


I have extended Mega*ProtoUser to achieve cookie-based perpetual
login..  and it was fairly easy to do except I ended up having to do
something hackish simply because there are two private object members
in the class that are core to the functionality I've extended.

Namely:

private object curUserId extends SessionVar[Box[String]](Empty)

private object curUser extends RequestVar[Box[ModelType]]
(currentUserId.flatMap(id => getSingleton.find(id)))

I have no idea if this would be an acceptable change, but at least for
one user of lift it would make much more sense that in the spirit of
*ProtoUser's clear intent for extensibility that these members simply
become:

protected val curUserId = new SessionVar[Box[String]](Empty){}

protected val curUser = new RequestVar[Box[ModelType]]
(currentUserId.flatMap(id => getSingleton.find(id))){}

Unless I'm not properly understanding what object members actually
are? I'm interpreting them as being final vals assigned to instances
of anonymous classes (rough tests in the scala console seem to verify
this)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to