Phew, I 'm marginally happy that I'm not the only slightly confused here.

I tried the following code and got a NullPointerException.
I also don't see a a method "setLoginName".

Can anyone enlighten me as to whats going wrong?

<code>
    TurbineUser user = (TurbineUser)TurbineSecurity.getAnonymousUser();
    user.setUserName("collie");
    user.setFirstName("colin");
    user.setLastName("chalmers");
    TurbineSecurity.addUser(user, "password");
</code>

Should there also be a method for setting email address?

/colin


----- Original Message -----
From: "Gopal Ramasammy-Cook" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 20, 2000 6:55 AM
Subject: Re: I'm confused :-(



> a bit better, but still wrong!
>
> TurbineUser user = TurbineSecurity.getAnonymousUser();
> user.setLoginName("collie");
> user.setFirstName("colin");
> TurbineSercurity.addUser(user, "password");

Now I am a bit confused. I thought TurbineSecurity was a facade class to
hide the actual security implementation, which is based on the User
interface (and not the TurbineUser class) ie. code that users the security
implementation should not know that TurbineUser actually implements the User
interface.

Thus, I would have thought that the correct code for the above is as
follows:

User user = TurbineSecurity.getAnonymousUser();
user.setLoginName("collie");
user.setFirstName("colin");
TurbineSercurity.addUser(user, "password");

Am I missing something?

Regards
Chris




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]





------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to