On Tue, Mar 17, 2009 at 4:40 PM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:


3) Suppose there are users that can register in my site, and there is a crud of User. But, that's MY User. I mean, User class will have attributes of MY application. However, I still need a user for Pier, so that to let the user post, create blogs, etc....How can I do this?

this one is trickier i think. I have overridden WASession and added a user variable for my user requirements, then in the config screen (in the Web Browser) there is a place to override the default Session with your own subclass. In Pier there is a PUUser class but I don't think it so easy to get Pier to use a subclass, so that may not suit your purposes.

But in that case how can you map your user to pier user ?
 
That is what is not as easy. Not as easy as creating a subclass of WASession  with an instance var to hold an instance of YOUR user class. this can be referred to from any seaside component by callng self session (or self session user if that is the name of the instance var to get a reference of your user object). You simply tell seaside to use your session class in your application;s config page.
Lukas mentioned that you could subclass PUUser but I am not sure where you would tell Pier to create instances of your subclass rather than PUUser.