[ic] Auto-create of user failed

Jonathan Clark jonc at webmaint.com
Thu Jan 6 08:41:55 EST 2005


> > > > I have now seen the below happen on two separate sites.
> > > >
> > > > Both sites are running 5.3
> > > >
> > > > I believe the problem is caused by the user trying to
> > > > complete the order without a post code.
> > > >
> > > > Has anyone had similar problems.
> > > >
> > > > 193.1.100.105 JUooP59X:193.1.100.105 -
> > > > [05/January/2005:21:47:16 +3500] sugarfree
> > > > /cgi-bin/sugarfree/process Safe: Auto-create of user failed.
> > > > at (tag 'perl') line 1.
> > > > >
> > > > >  die errmsg("Auto-create of user failed.");
> > > > >
> > > > 193.1.100.105 JUooP59X:193.1.100.105 -
> > > > [05/January/2005:21:47:16 +3500] sugarfree
> > > > /cgi-bin/sugarfree/process Route log failed.
> > > > 193.1.100.105 JUooP59X:193.1.100.105 -
> > > > [05/January/2005:21:47:16 +3500] sugarfree
> > > > /cgi-bin/sugarfree/process ERRORS on ORDER :
> > > > > Error during creation of order routing log:
> > > > > Route log failed. at /usr/local/interchange/lib/Vend/Order.pm
> line
> > > > 2000.
> > > > >
> > > >
> > >
> > > Yep, happened to me lots of times. Sometimes it's been because the
> user
> > > table already had a user with the username in it, and other times
> > > it's been
> > > for reasons that I still am yet to deduce from the forensic
> evidence.
> > It's
> > > really quite frustrating. Sorry I haven't got anything more helpful
> to
> > > suggest, but you're definitely not alone.
> >
> > Password too short or missing (based on zip code) is the usual
> problem.
> > Password must be four or more characters which is why altering the
> code in
> > etc/log_transaction to prefix with four characters has been suggested.
> >
> > We use auto-generation of random passwords which gets around this.
> >
> > It is also possible to create this problem during a site migration. If
> the
> > username counter gets out of sync with the userdb so that it tries to
> > create
> > a username which already exists.
> >
> > Jonathan.
> >
>
> Thank you Jonathan for your reply.
>
> Joachim suggested the mv_password=pass[value zip] in log_transaction as
> a work around but I am interested in the auto-generation of random
> passwords.
>
> As I said in my reply to Joachim I seem to be slow in the uptake on this
> so!
> What code would be required to change from the zip to the random
> generation?
>
> I am very sure it is not that record id already existing problems as it
> has only occurred the 2 times.  One of these on a new site and the other
> was 100 or so orders ago.

Have a look at this post from Joel Vandal:

  http://www.icdevgroup.org/archive/interchange-users/2000/msg08215.html

Due to the use of an absolute path to the dictionary file, it would need to
be a global usertag. You can get round this though by symlinking the
dictionary file to within the catalog - say to <catroot>/share/dict/words.
You can then change $dict = 'share/dict/words'.

In log_transaction you then have:

	[tmp auto_create]1[/tmp]
	[seti auto_password][generate-password][/seti]
	[if type=explicit compare=|
		[userdb
			function=new_account
			assign_username=1
			password='[scratch auto_password]'
			verify='[scratch auto_password]'
		]
		|]
		[seti mv_autocreate]
			mv_username=[data session username]
			mv_password=[scratch auto_password]
		[/seti]
		..


Jonathan


--
Jonathan Clark
Managing Director,
Webmaint.com   - Building Clever Websites        http://www.webmaint.com
Webmaint.net   - Business Web Hosting            http://www.webmaint.net
Cartridge SAVE - Printer Consumables Online
http://www.cartridgesave.co.uk
WireTel        - Internet Connectivity Solutions http://www.wiretel.net



More information about the interchange-users mailing list