Rafal,
I may be getting closer as to why the code below doesn't work (for me from
an IDE).
I was stepping through the code and saw that in BaseSecurityService in the
method "addUser" UserManager = null. Which is probably where the
NullPointerException is coming from.
That's probably because it should be initialised in the init() method in the
BaseSecurityService when Turbine is used as a servlet, or not? The way I'm
accessing the code at the moment means it's not being initialised.
Hmm, is there any way that I can fake this from an IDE (kawa) so that I can
continue to step through the code without changing too much?
/colin
> Colin Chalmers wrote:
>
> > Phew, I 'm marginally happy that I'm not the only slightly confused
here.
> >
> > I tried the following code and got a NullPointerException.
>
> could you post the stacktrace?
>
> > I also don't see a a method "setLoginName".
>
> it's setUserName, as seen below...
>
> > 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?
>
> It was missing. I just added it.
>
> Rafal
>
> --
> Rafal Krzewski
> Senior Internet Developer
> mailto:[EMAIL PROTECTED]
> +48 22 8534830 http://e-point.pl
>
>
> ------------------------------------------------------------
> 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]