[rt-users] Notify new users about their login information
Gene LeDuc
gleduc at mail.sdsu.edu
Wed May 20 14:35:43 EDT 2009
Hi Tommy,
The database is whatever database that was decided on when RT was
installed; it has nothing to do with perl. We use MySQL for our database
and I use Toad to do my snooping. I really can't tell you anything about
your installation's database or how to access it.
Here there be dragons, lad... Pretty much everyone agrees that accessing
the database directly, instead of letting RT do the grunt work, is not
generally a great idea. I did it because I wanted to understand what is
going on behind the scenes with RT. These observations have often been
helpful, but at other times have led me down the wrong path. You should
never modify the database directly.
Gene
At 11:09 AM 5/20/2009, Thomas Fluch wrote:
>thank you for your example code!
>
>You said, that you poked aroung in the database. I guess, that this
>database would help me a lot finding objects and their preferences I can
>use in a custom condition or custom action. Would you tell where i can
>find this database exactly so that i can try to understand perl a little?
>
>Thank you!
>Best regards, Tommy!
>
> >>> Gene LeDuc <gleduc at mail.sdsu.edu> 2009-05-18 18:39 >>>
>Ah, didn't realize you meant creating a user via the web. Poking around in
>the database, I'd guess that something like the following might work as
>your custom condition:
>
>{ ### True when new user created via web
> my $TA = $self->TransactionObj;
> my $val = $TA->ObjectType eq 'RT::User'
> && $TA->Type eq 'Create'
> && $TA->CreatorObj->Id > != 1;
> return $val;
>}
>
>I haven't tried the above (or used ObjectType), but I think it's at least a
>good place to start. The following observations are for v3.6.3. When a
>user is created via an e-mail ticket, the Creator is the System user, and
>the System user is #1. When a user is created via a web session, the
>Creator is the logged in user, which is always > #12. Set this up in a
>global scrip and use a variant of the auto-password template you're already
>using for tickets. If it doesn't work, throw some debug logging stuff in
>and see what you get. Once you get it working, this would be a good wiki
>addition!
--
Gene LeDuc, GSEC
Security Analyst
San Diego State University
More information about the rt-users
mailing list