{"id":2226,"date":"2013-09-10T06:20:19","date_gmt":"2013-09-10T12:20:19","guid":{"rendered":"http:\/\/allidm.com\/blog\/?p=2226"},"modified":"2013-10-14T22:49:55","modified_gmt":"2013-10-15T04:49:55","slug":"which-macros-are-available-in-open-source-password-self-service-for-ldap-directories-pwm","status":"publish","type":"post","link":"https:\/\/allidm.com\/blog\/which-macros-are-available-in-open-source-password-self-service-for-ldap-directories-pwm\/","title":{"rendered":"Which macros are available in Open Source Password Self Service for LDAP directories (PWM)?"},"content":{"rendered":"<p>PWM Macros can be used at various places in the PWM configuration. To access to the available macros go to the<strong> menu View &gt; PWM Macro Help<\/strong>.<\/p>\n<p><strong>The following macros are available<\/strong>:<\/p>\n<table border=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>@LDAP:&lt;attributeName&gt;@<\/td>\n<td>Replace with LDAP value of &lt;attributeName&gt;<\/td>\n<\/tr>\n<tr>\n<td>@LDAP:DN@<\/td>\n<td>Replace with LDAP value of user&#8217;s Distinguished Name<\/td>\n<\/tr>\n<tr>\n<td>@User:PwExpireTime@<\/td>\n<td>Time user&#8217;s password will expire in PWM default format.<\/td>\n<\/tr>\n<tr>\n<td>@User:PwExpireTime:&lt;pattern&gt;@<\/td>\n<td>Time user&#8217;s password will expire where &lt;pattern&gt; is a <a href=\"http:\/\/localhost:8080\/pwm\/config\/ConfigManager\">SimpleDateFormat<\/a> pattern<\/td>\n<\/tr>\n<tr>\n<td>@User:DaysUntilPwExpire@<\/td>\n<td>Number of days until the user&#8217;s password will expire<\/td>\n<\/tr>\n<tr>\n<td>@User:ID@<\/td>\n<td>User&#8217;s UserID (if authenticated)<\/td>\n<\/tr>\n<tr>\n<td>@PWM:InstanceID@<\/td>\n<td>Instance ID of the PWM application<\/td>\n<\/tr>\n<tr>\n<td>@PWM:CurrentTime@<\/td>\n<td>Current time in default PWM format.<\/td>\n<\/tr>\n<tr>\n<td>@PWM:CurrentTime:&lt;pattern&gt;@<\/td>\n<td>Current time where &lt;pattern&gt; is a <a href=\"http:\/\/localhost:8080\/pwm\/config\/ConfigManager\">SimpleDateFormat<\/a> pattern<\/td>\n<\/tr>\n<tr>\n<td>@PWM:SiteURL@<\/td>\n<td>URL of the site (<i>http:\/\/www.example.com\/pwm<\/i>)<\/td>\n<\/tr>\n<tr>\n<td>@PWM:SiteHost@<\/td>\n<td>Hostname of the site (<i>www.example.com<\/i>)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>To use a macro, just place the macro into the configuration value such as: <\/strong><\/p>\n<blockquote><p>Dear, @LDAP:givenName@, Thank you for your activity today, @PWM:CurrentTime:EEE, MMM d, yyyy@.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><strong>This macro will then be expanded to:<\/strong><\/p>\n<blockquote><p>Dear, John, Thank you for your activity today, Wed, Jul 4, 2001.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>PWM Macros can be used at various places in the PWM configuration. To access to the available macros go to the menu View &gt; PWM Macro Help. The following macros are available: @LDAP:&lt;attributeName&gt;@ Replace with LDAP value of &lt;attributeName&gt; @LDAP:DN@ Replace with LDAP value of user&#8217;s Distinguished Name @User:PwExpireTime@ Time user&#8217;s password will expire in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1079,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[264,6,167,441,662],"tags":[454,345,679,680],"class_list":["post-2226","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-article","category-news","category-open-source","category-open-source-identity-management","category-pwm","tag-iam-password-management","tag-password-manager","tag-password-self-service-for-ldap-directories","tag-self-service"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2012\/06\/Identity-Management-Technical-Allidm.jpg?fit=320%2C240&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p25vfy-zU","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/2226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/comments?post=2226"}],"version-history":[{"count":3,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/2226\/revisions"}],"predecessor-version":[{"id":2317,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/2226\/revisions\/2317"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/media\/1079"}],"wp:attachment":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/media?parent=2226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/categories?post=2226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/tags?post=2226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}