- This topic has 2 replies, 2 voices, and was last updated 10 years, 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › How to get user data and paste it in input value
Hello again!
There is great plugin — https://simple-membership-plugin.com/simple-membership-addon-show-member-info/. With it it’s possible to display user data (for example — e-mail).
But it’s impossible to paste shortcode in <input> value=””. I need smth like this:
<input type=”hidden” name=”email” value=”[swpm_show_member_info column=”email”]” >
It’s impossible as I know because shortcode wouldn’t be rendered inside value.
But how to paste these data to value?
I also found article about getting user data that way:
<?php
if(SwpmMemberUtils::is_member_logged_in()) {
$auth = SwpmAuth::get_instance();
$expiry_date = $auth->get_expire_date();
echo “Expiry date: “.$expiry_date;
}
else{
echo “You are not logged-in as a member”;
}
?>
If someone could write me how to get username, e-mail, first and last names, phone that way it would also help me.
I found the way to do it. It wasn’t easy way but it works.
https://wordpress.org/support/topic/shortcodes-not-working-in-input-element-after-update-to-423
Hi, thank you for sharing. I am sure someone wanting to achieve the same as you, will find your link helpful.
Regards