[ic] Outboard userdb for passwords - was 'Tax by customer, not state'

Philip Alves interchange-users@icdevgroup.org
Sat Nov 9 00:20:01 2002


> I've been reading the docs and archives, and attempted some changes of my
> own, but all with no luck.
>
> What I have is a userdb which is coming from an old, large database that
is
> not formatted for country or state.  It's set up as address1, address2...
> and these are completely messed because of the way they were input by the
> staff.  Luckily, I have a column in userdb called 'tax_percent'.  I know
> that salestax is figured out using a list of states either in variable.txt
> or salestax.asc.  I was wondering if there is a way to read the value
> directly from userdb.
>
> I did also see this:
>
>    SalesTaxFunction  <<EOR
>          my $vendor_id = $Session->{source};
>        my $tax = $TextSearch->hash( {
>                            se => $vendor_id,
>                            fi => 'salestax.asc',
>                            sf => 'vendor_code',
>                            ml => 1000,
>                            } );
>        $tax = {} if ! $tax;
>        $tax->{DEFAULT} = 0.0;
>        return $tax;
>    EOR
>
> This looks like it might do the trick with a few changes, but I'm not sure
> how to go about implementing it.  Any thoughts?

Never mind.  Got this by changing 'state' in the TAXFIELD to username, and
putting usernames and their corresponding tax rates in shipping.asc.

But now a more interesting question, and one that doesn't appear to in the
archives anywhere.

I would like to place passwords in a separate userdb file.  According to the
docs, this is possible using an outboard specifier, but it also says that
you need to initialize the values for use after the user has logged in.
This appears to be a problem, as the passwords, which are needed to login,
would be in the outboard.  If this isn't an issue, then would this be the
correct format for the outboard?

        UserDB  outboard  <<EOF
            password=passwordfile::password
        EOF

I need to have this set up this way because a new userdb.txt file will be
uploaded to the products directory every night automatically, but that would
me the loss of any changes to passwords, which I don't want.

Thanks again for all the help!  I'm nearing completion on my first IC
project, and I'm eternally grateful to everybody for putting up with my
boneheaded rookie questions.  :)

Phil