[rt-users] Notify new users about their login information

Thomas Fluch FluchT at wyeth.com
Fri May 22 07:32:14 EDT 2009


Hey Gene,
 
I know what you mean and I would never manually change something in the database or in the whole files of the RT installation since I didnt install it but im supposed to configure it via the interface.
 
What i actually thought that you mean is that there is one database which contains all objects (like queue, user, group, etc) and all preferences of them (user mail address, queue name, etc.). I thought that i then can enter this database and can have a look on all these preferences to (i.e.) find out what your code below actually should do :D... or how I can find out the queues a user is watcher of (regarding to another problem I floated). Because you wrote an example condition for me...after that condition I would have to do the same progress the template from the wiki does (creating a username, creating a password —> both for new users). But i cant access this scrip...so i have no idea how to find out what the code to generate a password and send it via email looks like.
 
But ok, i will try out something. I hope you understand that its a little bit hard without any perl knowledge and wihtout knowing all the objects and preferences RT uses and I theoretically could access.
 
I let you know, if i have a specific problem with my codes.
 
Thanks for your efforts.
 
best regards,
Tommy!

>>> Gene  LeDuc <gleduc at mail.sdsu.edu> 2009-05-20 20:35:43 >>>

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 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090522/0aa5c6d0/attachment.htm>


More information about the rt-users mailing list