Talk:AutogeneratedPassword/@comment-BillCole-20140423222528/@comment-131.111.184.92-20141226200602

From Request Tracker Wiki
Revision as of 15:06, 26 December 2014 by 131.111.184.92 (talk) (Created page with "My attempt at implementing your suggestion (since we needed exactly the case you mention) below.  Note that I've also removed the '!privileged' check, since it doesn't make a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

My attempt at implementing your suggestion (since we needed exactly the case you mention) below.  Note that I've also removed the '!privileged' check, since it doesn't make a lot of sense in our particular case.

Caution: I'm still very new to RT (and wikia, for that matter) — readers, use at your own discretion. Perhaps somebody more experienced with RT will be able to comment if there's something wrong with this.

*RT::User::GenerateRandomNextChar = \&RT::User::_GenerateRandomNextChar;
my $requestors = $Ticket->Requestor->UserMembersObj( Recursively => 0 );
my $requestor = $requestors->Count == 1 ? $requestors->First : undef;
if ((defined $requestor) &&
    ($requestor->id != $RT::Nobody->id) &&
    ($requestor->__Value('Password') eq '*NO-PASSWORD*')
    ) {