[ic] indirect_login with AUTO_INCREMENT field

Stefan Hornburg racke at linuxia.de
Thu Sep 28 10:51:39 EDT 2006


Bill Carr wrote:
> I can not figure out how to use indirect_login and an AUTO_INCREMENT  
> username column with my UserDB to create a new account.
> 
> mysql> SHOW CREATE TABLE userdb;
> CREATE TABLE `userdb` (
>   `username` int(11) NOT NULL auto_increment,
>   `email` varchar(128) NOT NULL default '',
>   `password` varchar(20) NOT NULL default '',
>   `acl` text,
> ...
> 
> I've tried all kinds of combinations like below.
> UserDB    default    <<EOD
> {
>     userminlen        => 1,
>     passminlen        => 1,
>     crypt        => 0,
>     time_field        => 'mod_time',
>     database        => 'userdb',
>     indirect_login  => 'email',
>     logfile        => 'userdb.log',
>     sql_counter        => 'userdb:username',
>     assign_username => 1
> }
> 
> I always end up with two records in my UserDB like so:
> mysql> SELECT username,email,password FROM userdb ORDER BY username  
> DESC LIMIT 2;
> +----------+--------------------------+----------+
> | username | email                    | password |
> +----------+--------------------------+----------+
> |     1724 |                          | password |
> |     1723 | bill at bottlenose-wine.com |          |
> +----------+--------------------------+----------+
> 
> It seems like I could make sure I have a numeric counter file with a  
> value at least as high as MAX(username) but that seems like something  
> that should be able to be avoided. Is there a way to use an  
> AUTO_INCREMENT username column with indirect_login in Interchange?

The problem is that IC creates first a record with just 
username/password and fills in the details later. Personally, I think
accounts should created in an atomic operation.

Bye
	Racke



-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list