[rt-users] RT 3.6.4 - Template Autogenerate Password
SINN Andreas
Andreas.Sinn at cpb-software.com
Thu May 15 02:35:54 EDT 2008
Hello everybody!
I have the following template for autogenerating user and password after
creating a new ticket:
------------------------------------------------------------------------
-----------------------
Subject: AutoReply: {$Ticket->Subject}
{
*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. RT was not able to set a password for
you.
Please contact your local RT administrator for assistance.";
}
$OUT .= "
You can check the current status and history of your requests at:
".$RT::WebURL."
When prompted, enter the following username and password:
Username: ".$user->Name."
Password: ".$pass."
";
}
}
------------------------------------------------------------------------
-----------------------
How can I add this user to a group automatically in this script?
Thanks,
Andreas
More information about the rt-users
mailing list