The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

(Windows) Active Directory Username shortcode

Labels

This Discussion is public

Notifications

We are implementing Formidable Pro in some projects at my job and we decided we didn't want to require users to have a wordpress account to use our system. The following shortcode pulls the users login credentials (username):

//create [aduser] shortcode
function aduser_shortcode( $atts ){
$user = getenv('username');
return $user;
}
add_shortcode( 'aduser', 'aduser_shortcode' );

Now if you put the shortcode "[aduser]" into a field as the default value, it will populate the currently logged in username in the active directory.

Discussion closed.