[rt-devel] Self Service Enhancement
Odhiambo Washington
wash at wananchi.biz
Sat Feb 22 10:39:19 EST 2003
Hi,
Sometimes back, Jesse posted an addon to the AutoReply template (rt2) that would
send a random password to a requestor on ticket creation, such that s/he would
be able to login to the rt web UI and view tickets they requested.
By any chance, is there something like that for RT3?
Here is the code that I used with RT2:
{
*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."
";
}
}
Thank you.
-Wash
--
Odhiambo Washington <wash at wananchi.com> "The box said 'Requires
Wananchi Online Ltd. www.wananchi.com Windows 95, NT, or better,'
Tel: +254 2 313985-9 +254 2 313922 so I installed FreeBSD."
GSM: +254 72 743223 +254 733 744121 This sig is McQ! :-)
"Why was I born with such contemporaries?"
-- Oscar Wilde
More information about the Rt-devel
mailing list