[Rt-devel] Getting user custom value

Sam Chenkin schenkin at gmail.com
Thu Feb 5 23:56:20 EST 2009


I've spent a huge amount of time on this and just can't figure it out.

I want a custom action that pulls a custom field from a user. I'm
using the following code:

my $currentTicket = $self->TicketObj;
my $currentUser = new RT::CurrentUser;
$currentUser->LoadByEmail( $currentTicket->RequestorAddresses() );
$myValue = $currentUser->FirstCustomFieldValue( '3' );

I get a blank string. The strange thing is, I've printed EVERYTHING
(and I mean everything) from every method that gets called from this
method. These methods are called when editing values of the field from
the web-interface, and they work fine there. The EXACT same method
calls (same field id, object id, everything) fail to work in this
context.

I don't get it. Anyone have any ideas? I'd be eternally grateful.

~Sam


More information about the Rt-devel mailing list