I recently completed a script that others might find helpful.
Given a domain, and a list of users in the domain, the script searches
for Bugzilla accounts with logins of user@domain, and changes the
logins to something not within the domain (so they won't conflict with
future users who get previously-used usernames). If the script is
given a working e-mail address for the user, the script lets the user
know that their login has changed. Once done, I'm happy to give it
away to anyone who would like to use it.
I'm looking for constructive comments of all types. Does it seem
useful? Are there better* ways to implement certain portions?
Questions or issues not addressed by the POD? Pretty much anything
would be useful.
Thanks in advance for the comments!
| Alfred Karl Kornel
| -- [hidden email] | Member- Europa Research Group
| UNIX / RESOLVE Consultant
* I guess, with perl and its many ways to do it, better might not be the right word.
On Sun, 2005-06-12 at 08:58 -0400, A. Karl Kornel wrote:
> Are there better* ways to implement certain portions?
Well, to start with, you should use standard Bugzilla functions instead
of re-writing every single little thing into manual DBI calls and custom
perl code, and instead of copying the functions out of the modules.
Actually "use" Bugzilla::Config for the parameters, Bugzilla->dbh for
the database handle, etc.
You should "use constant" for the user-modifiable configuration
Use templates for the email, and use standard Bugzilla ways of sending
email, like MessageToMTA.
In general, also feel free to attach the script to an RFE and try to
get it into contrib/ if you feel at some point like it's ready for that.
It would require some basic review, since we do become (somewhat) the
maintainers of stuff in contrib/ once it's there.