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

Mike Heins interchange-users@icdevgroup.org
Sat Nov 9 00:53:00 2002


Quoting Philip Alves (philip.alves@sympatico.ca):
> > 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

Password is a field you can't do that with -- I guess it is not explicitly
mentioned in the docs.

Why don't you turn it around? Make the uploaded file be "autouser", and
place the rest of the fields outboard there?

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer