Le 01/06/2016 13:13, Vegard Vesterheim a écrit :
>
>
> I found a solution, I think the problem was related to loading the
> correct User Object.
>
indeed, I misread you're code :(
> The following works:
>
> my $UserObj = $session{'CurrentUser'}->UserObj;
> my $cf_value = $UserObj->FirstCustomFieldValue('PreferEditDisplay');
>
> I would have thought that
> RT::User->new($session{'CurrentUser'})
> and
> $session{'CurrentUser'}->UserObj
>
> would be equivalent, but apparently not.
>
no, either:
my $UserObj = RT::User->new($session{'CurrentUser'});
$UserObj->Load(a user name);
or in your case, just $session{'CurrentUser'}->UserObj
> Thanks for the hint.
>
you're welcome
--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:[email protected] - http://www.easter-eggs.com
---------
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016