[rt-users] Where to insert the AutogeneratedPassword template text?

Kanwar Ranbir Sandhu m3freak at rogers.com
Wed Jul 13 22:52:11 EDT 2005


On Wed, 2005-13-07 at 21:28 -0500, Matt England wrote:
> Bottom line: I don't know the procedure for getting the 
> autoreply-email-text to change.  I put the changes into etc/initialdata, 
> rebooted my webserver, and still not change in my autoreply email.  :(

We have a Support queue in which we've created an auto reply template.
The template itself contains the code required to auto generate a
password if the user doesn't have one already, or to simply remind
him/her how to have it reset if the password has been forgotten.

The template is based almost entirely on the one in the wiki.  Here's
the relevant bit from our template:

{
*RT::User::GenerateRandomNextChar = \&RT::User::_GenerateRandomNextChar;

if (($Transaction->CreatorObj->id != $RT::Nobody->id) &&

    (!$Transaction->CreatorObj->Privileged) &&
    ($Transaction->CreatorObj->__Value('Password') eq '*NO-PASSWORD*')
    ) {

        my $user = RT::User->new($RT::SystemUser);
        $user->Load($Transaction->CreatorObj->Id);
        my ($stat, $pass) = $user->SetRandomPassword();

        if (!$stat) {
                $OUT .= "An internal error has occurred. Request Tracker
was not able to set a password for you.  Please phone Systems Aligned
Technical Support for assistance.";

        }

$OUT .= "You can review the current status and history of your requests
at:

        ".$RT::WebURL."

Our technical support system has automatically assigned you a password.
When prompted, enter the following user name and password at the login
page:

        User name: ".$user->Name."
        Password : ".$pass."

We recommend you change your password after you sign into the support
website.
";
      }
else  
      {

$OUT .= "If you do not remember your password for the Support website,
you can reset it by sending an email to [        some address        ]
with the subject, Reset Password.  Your password will be automatically
reset and the new one emailed to you.";
      }
}


We use a basic scrip that fires when an email is sent to the Support
queue.  The auto reply (above) is the one that is sent out.

Does that help?

Regards,

Ranbir
-- 
Kanwar Ranbir Sandhu
Systems Aligned Inc.
www.systemsaligned.com




More information about the rt-users mailing list