[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Automatically generating usernames and passwords
Quoting John Allman (allmanj@houseofireland.com):
> Hi - i realise this is a bit of an odd one but i want to be able to have
> a page similar to the usual new_account page but which will optionally
> generate a new unique username and password if none are supplied. At the
> moment i'm considering using a counter as the basis for the username and
> locking it and incrementing it each time a new username is created (i'm
> intending to do this by using mysqls locking abilities. is there a
> better way to do it?)
>
> Unfortunately my approach to having it optionally use a different
> username if none is supplied doesn't seem to work. My plan was to set
> username in mv_click if it was not already set, but it doesn't seem to
> be working. I stripped down my code to just set username regardless but
> still nothing.
>
> Can someone point out what's wrong with this?
> [set EmailCheck]
> [value name=username set="fartknocker"]
> [perl]
> $CGI->{username}="fartknocker";
> [/perl]
> [/set]
>
> other than ugliness, like. i have mv_click set to EmailCheck in the form.
>
> I'm guessing my whole approach is wrong. Can anybody give me advice?
>
I don't know why you don't just use the "assign_username" option
of the userdb tag.....there is an example in etc/log_transaction.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
Software axiom: Lack of speed kills.