[rt-users] Password reminder w/ conditional password generation
Priddy, John
JPriddy at thegoldensource.com
Fri Aug 26 22:52:27 EDT 2005
I am trying to find a way to include a password reminder in each
autoreply from one of my queues. As it is right now I ripped off code
from http://wiki.bestpractical.com/index.cgi?AutogeneratedPassword which
works great for creating a password if a user doesn't exist, but what
about users that existed before added this? They create a ticket and
because they already exist as a user they are unable to take advantage
of the web interface. I have currently removed the modified it so that
everyones password is reset, and is emailed out on each ticket. This
workaround isn't too great either as its pretty silly to reset a
password every time, as well as the annoyance of having to reset my own
as well as other admins if we have to forward requests that were sent to
us instead of rt.
Can anyone give me any tips on a way to test for the password being null
and then run the autogeneration part of the script if this is the case?
or at least skip over queue admin users?
John
This is RT 3.4. The code I ripped off that's part of the template run
when a ticket is created is below:
{
*RT::User::GenerateRandomNextChar = \&RT::User::_GenerateRandomNextChar;
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 forward this email back to TechSupport for assistance.";
}
$OUT .= "
You can check the current status and history of all your requests at:
".$RT::WebURL."
When prompted, enter the following username and password:
Username: ".$user->Name."
Password: ".$pass."
";
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050826/4e114db0/attachment.htm>
More information about the rt-users
mailing list