[ic] cannot create account on public side
Stuart Lowe
stuart at stuartlowe.com
Fri Apr 28 21:11:22 EDT 2006
> >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.
>
> Peter
Ah, so it doesn't actually attempt to insert the password value until the second step.
Well that would make sense then, wouldn't it.
I guess I was fixating over "I've provided a string for the password, why's it
complaining about the NOT NULL constraint?"
Ah well, I've got a working demo now and when I'm comfortable with that I'll attempt to build
some simple catalogs. Looking foward to learning more here.
An excellent explanation.
Thank you very much!
Stu.
--
Stuart Lowe | Toronto, CAN | key ID on keyserver | Skype stuart.lowe
Fedora Core release 4 (Stentz) GNU/Linux kernel 2.6.11-1.1369_FC4 on i686 localhost3.localdomain
18:40:56 up 16 days, 1:57, 4 users, load average: 1.53, 1.31, 1.16
More information about the interchange-users
mailing list