Skip to content

Commit f1e9838

Browse files
sirainencmouse
authored andcommitted
auth/ldap: Convert ldap variables
1 parent 7f38c0a commit f1e9838

File tree

1 file changed

+2
-9
lines changed
  • docs/core/config/auth/databases

1 file changed

+2
-9
lines changed

docs/core/config/auth/databases/ldap.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,8 @@ The following variables can be used inside the [[setting,passdb]] / [[setting,us
425425

426426
| Variable | Description |
427427
| -------- | ----------- |
428-
| `%{ldap:attrName:default}` | Fetches a single-valued attribute. If the attribute is not present, the specified default is taken instead. If there are multiple values, all except the first are ignored (with warning). |
429-
| `%{ldap:attrName}` | If the default is omitted, empty string `""` is assumed. |
430-
| `%{ldap_multi:attrName:sep:default}` | [[added,ldap_multi_added]] Fetches a multi-valued attribute. If the attribute is not present, the specified default is taken instead. If there are multiple values, they are concatenated using sep as the separator. |
431-
| `%{ldap_multi:attrName:sep}` | [[added,ldap_multi_added]] If the default is omitted, empty string is assumed `""`. |
432-
| `%{ldap_multi:attrName::default}` | [[added,ldap_multi_added]] The default for the separator is a single space `" "`. |
433-
| `%{ldap_multi:attrName::}` | [[added,ldap_multi_added]] How to specify a column `":"` as separator, default is `""`. |
434-
| `%{ldap_multi:attrName:::default}` | [[added,ldap_multi_added]] How to specify a column `":"` as separator, default explicitly defined. |
435-
| `%{ldap_multi:attrName:,}` | [[added,ldap_multi_added]] How to specify a comma `","` as separator, default is `""`. |
436-
| `%{ldap_multi:attrName:,:default}` | [[added,ldap_multi_added]] How to specify a comma `","` as separator, default explicitly defined. |
428+
| `%{ldap:attrName}` | Fetches a single-valued attribute. Fails if the attribute is not present, unless the `|default` filter is given. If there are multiple values, all except the first are ignored (with warning). |
429+
| `%{ldap_multi:attrName}` | [[added,ldap_multi_added]] Fetches a multi-valued attribute and outputs the values separated by tabs, with each value "tab-escaped". Use the `list` [[link,settings_variables_filters,filter]] to further convert it to a wanted value. For example: `mail_access_groups = %{ldap_multi:userGroups \| list \| default('mail')}` |
437430
| `%{ldap:dn}` | Retrieves the Distinguished Name of the entry. |
438431

439432
### Multiple Queries via userdbs

0 commit comments

Comments
 (0)