[ic] cannot create account on public side
peter at pajamian.dhs.org
Fri Apr 28 17:19:05 EDT 2006
On 04/28/2006 06:45 AM, Stuart Lowe wrote:
> OK: when I manually set the default to '' for column password (and the sql was verbatim btw)
> as well as adding the corresponding default to catroot/dbconf/pgsql/userdb.pgsql:
> Database userdb COLUMN_DEF "password=varchar(64) NOT NULL DEFAULT = ''" (is this correct??)
> I was immediately able to create a new account and log in to it. I was also able to log out,
> send orders etc. If I tried to create an account without a password, it wouldn't let me
> ('Must enter at least 4 characters for password.') which is good.
> All the correct user info was also reflected in the userdb table.
> This is good. But why?
> Can anyone offer any insight into why I had to do this to get it to work?
Yep, Interchange is trying to create the users in two steps. First it
creates a partially blank entry in the userdb table and then in a later
step it fills it in with the password and other info. It could not
comoplete the first step before because the database was complaining
that it didn't have a value to fill into the "NOT NULL" field for
password. By supplying a default value for password you allow the
database to put something there, (even if it's just an empty string) and
so it can happily go on its way.
The error that you were getting was from postgresql and was very
specifically saying, "No password is being supplied by interchange but I
can't put NULL in here because this is a NOT NULL column." You needed
to supply something else to put in the password field, and a default to
the empty string ('') suffices.
More information about the interchange-users