Skip to Content.
Sympa Menu

en - Re: [sympa-users] access to user attributes in tt2

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: "Stefan Hornburg (Racke)" <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] access to user attributes in tt2
  • Date: Mon, 10 Jan 2022 16:38:49 +0100

On 10/01/2022 15:52, Jerome Pouilloux wrote:
Hi,
first of all, happy new year to every one.
I'm trying to get attributes from user in a tt2 template to check the value.
To do that, I have filled the field `attributes_user` in the table
`user_table`
in my tt2 I have tried to do
[% IF user  %]
 [% FOREACH vuser IN user.attributes %]
[% vuser  %]
[% END %]
 [% END %]
but the result is an hash who changes every time I refresh the page
example:HASH(0xd4442a0), HASH(0x790f858).
What am I missing?

user.attributes is a hash and not an array.

http://www.template-toolkit.org/docs/manual/VMethods.html#section_keys

Furthermore, is there a possibility to check a value directly in the ldap
configured in sympa.conf?


Please elaborate how you configure LDAP in sympa.conf.

Regards
Racke


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.19+.

Top of Page