You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Mike Kucera <mi...@home.com> on 2001/08/14 04:03:10 UTC

Turbine security and null user-ids

I am trying to add users to the TURBINE_USER table by using the TurbineSecurity.addUser mehod. The problem is that Turbine always tries to insert the user with a null user_id. This also happens when I try to grant permissions to a user.

I found a way arround this by using the following code:

      User newUser = TurbineSecurity.getUserInstance();
      BaseObject baseUser = (BaseObject)newUser;
      baseUser.setPrimaryKey(primaryKey);
      newUser.setUserName(username);
      TurbineSecurity.addUser(newUser, TurbineSecurity.encryptPassword(password));

This way I can set the primary key to whatever I want but I would still prefer to have Turbine do the work itself. If anyone has any idea how to stop turbine from always using null as a user_id in its tables, please let me know.

Re: Turbine security and null user-ids

Posted by Jon Stevens <jo...@latchkey.com>.
on 8/13/01 7:03 PM, "Mike Kucera" <mi...@home.com> wrote:

> If anyone has any idea how to stop turbine from always using null as a user_id
> in its tables, please let me know.

Setup your id_table properly.

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org