[rt-users] Alternative GUIs for RT?

Emmanuel Lacour elacour at easter-eggs.com
Wed Jun 1 08:39:58 EDT 2016


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:elacour at easter-eggs.com  -   http://www.easter-eggs.com



More information about the rt-users mailing list