[ic] cannot create account on public side

Stuart Lowe stuart at stuartlowe.com
Fri Apr 28 09:23:33 EDT 2006

On Thu, Apr 27, 2006 at 02:13:49PM -0700, Peter wrote:
> On 04/27/2006 06:52 AM, Stuart Lowe wrote:
> >(Customer record creation): There was an error adding you to the
> >customer table.
> >(table userdb): set_row error as called by Vend::Table::DBI:
> >DBD::Pg::db do failed: ERROR: null value in column "password"
> >violates not-null constraint fields=username,inactive
> >values='U00003',''''''
> Try this from the psql backend (SQL syntax from memory, not positive if 
> it is correct):
> alter table userdb alter password set default '';
> ...and also add the corresponding default to your 
> catroot/dbconf/pgsql/userdb.pgsql file.
> Peter
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users

OK: to address an additional previous question/suggestion, no, the accounts never got created whether I specified
a password or not.  error.log showed stuff like:

localhost3.localdomain ZSEh3cEB:localhost3.localdomain - [26/April/2006:19:43:16 -0400] standard /cgi-bin/standard/process set_row error as called by Vend::Table::DBI: DBD::Pg::db do failed: ERROR:  null value in column "password" violates not-null constraint
> fields=username,inactive
> values='U00001',''''''
localhost3.localdomain ZSEh3cEB:localhost3.localdomain - [26/April/2006:19:43:16 -0400] standard /cgi-bin/standard/process Safe: Auto-create of user failed. Reason: Cannot log in after new account creation: Invalid user name or password.
>  die errmsg("Auto-create of user failed. Reason: %s", $Session->{failure})

Now:  I tried the suggestion made by Peter of setting the column 'password' to have a default of '' in the userdb table.

I also added the following to catroot/dbconf/pgsql/userdb.pgsql:

Database  userdb  COLUMN_DEF   "password=varchar(64) NOT NULL DEFAULT = ''"

I restarted interchange and I was immediately able to create a new account, and to see this info properly reflected
when I queried the userdb table with pgsql.

I was also able to properly log in and log out with this account, and send test orders.

I also tried creating accounts without passwords, and it didn't let me (you get the 'Must enter at least 4 characters for password' message).

This is good.

Now, can anyone offer any insight into why setting the default of the password column to '' sorted things out here?

Thank you all for you suggestions and help.

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
 09:09:36 up 15 days, 16:26,  4 users,  load average: 1.16, 1.28, 1.26

More information about the interchange-users mailing list