Which macros are available in Open Source Password Self Service for LDAP directories (PWM)?

PWM Macros can be used at various places in the PWM configuration. To access to the available macros go to the menu View > PWM Macro Help.

The following macros are available:

@LDAP:<attributeName>@ Replace with LDAP value of <attributeName>
@LDAP:DN@ Replace with LDAP value of user’s Distinguished Name
@User:PwExpireTime@ Time user’s password will expire in PWM default format.
@User:PwExpireTime:<pattern>@ Time user’s password will expire where <pattern> is a SimpleDateFormat pattern
@User:DaysUntilPwExpire@ Number of days until the user’s password will expire
@User:ID@ User’s UserID (if authenticated)
@PWM:InstanceID@ Instance ID of the PWM application
@PWM:CurrentTime@ Current time in default PWM format.
@PWM:CurrentTime:<pattern>@ Current time where <pattern> is a SimpleDateFormat pattern
@PWM:SiteURL@ URL of the site (http://www.example.com/pwm)
@PWM:SiteHost@ Hostname of the site (www.example.com)

To use a macro, just place the macro into the configuration value such as:

Dear, @LDAP:givenName@, Thank you for your activity today, @PWM:CurrentTime:EEE, MMM d, yyyy@.

 

This macro will then be expanded to:

Dear, John, Thank you for your activity today, Wed, Jul 4, 2001.