Exported variables are the variables available to <ahref="../../documentation/1.4/writingrulesand_headers.html"class="wikilink1"title="documentation:1.4:writingrulesand_headers">write rules and headers</a>. They are extracted from the users database by the <ahref="../../documentation/1.4/start.html#authentication_users_and_password_databases"class="wikilink1"title="documentation:1.4:start">users module</a>.
To create a variable, you've just to map a user attributes in <acronymtitle="LemonLDAP::NG">LL::NG</acronym> using <code>Variables</code> » <code>Exported variables</code>. For each variable, The first field is the name which will be used in rules, macros or headers and the second field is the name of the user database field.
<ahref="/_detail/documentation/exportedvars.png?id=documentation%3A1.4%3Aexportedvars"class="media"title="documentation:exportedvars.png"><imgsrc="../../../media/documentation/exportedvars.png"class="mediacenter"title="Exported variables in the Manager"alt="Exported variables in the Manager"width="500"/></a>
<liclass="level1"><divclass="li"> macros are used to extend (or rewrite) <spanclass="curid"><ahref="../../documentation/1.4/exportedvars.html"class="wikilink1"title="documentation:1.4:exportedvars">exported variables</a></span>. A macro is stored as attributes: it can contain boolean results or any string</div>
<liclass="level1"><divclass="li"> groups are stored as space-separated strings in the special attribute “groups”: it contains the names of groups whose rules were returned true for the current user</div>
Note that groups are computed after macros, so a group rule may involve a macro value.
</p>
<p>
Besides, macros and groups are computed in alphanumeric order, that is, in the order they are displayed in the manager. For example, macro “macro1” will be computed before macro “macro2”: so, expression of macro2 may involve value of macro1. As same for groups: a group rule may involve another, previously computed group.