Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration
You are here: Home

jubel

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 23, 2025 at 2:13 pm in reply to: Best method to get and set eMember member custom fields? #85141
    jubel
    Participant

    Thank you! This was very helpful!
    Is there something like:

    wp_emember_put/set/ or write_user_details_by_id($field_key, $member_id);

    ???

    February 21, 2025 at 6:18 am in reply to: Best method to get and set eMember member custom fields? #85139
    jubel
    Participant

    Retrieving Custom Fields is easy for me, with methods, which emember brings with it self. Following shortcode I use to retrieve standard and custom fields:

    add_shortcode(‘user_prop’, function() {
    $emember_auth = Emember_Auth::getInstance();
    $user_id = $emember_auth->getUserInfo(‘member_id’);
    if (!empty($user_id))
    {
    //User is logged in so add your conditional code here
    $membership_level = $emember_auth->getUserInfo(‘membership_level’);
    if($membership_level == 2)
    {
    $emember_auth = Emember_Auth::getInstance();
    $username = $emember_auth->getUserInfo(‘user_name’);
    echo (“Username of the logged in member: “.$username . “<br />\n”);
    echo (“Mitgliedslevel: Abonnent” . “<br />\n”);
    $member = emember_get_member_by_username ($username);
    echo (“Member’s First Name: ” . $member->first_name . “<br />\n”); //Output the first name
    echo (“Member’s Last Name: ” . $member->last_name . “<br />\n”); //Output the last name
    $value = $emember_auth->getUserInfo(‘Kursleiter’);
    echo (“Kursleiter: ” . $value . “<br />\n”); //Output a custom field ???
    $value = $emember_auth->getUserInfo(‘Umfragenteilnehmer’);
    echo (“Umfragenteilnehmer: ” . $value . “<br />\n”); //Output a custom field ???
    }
    else
    {
    echo “no Abonnent”;
    }
    }
    });

    But changing to Form Builder (I hope I am not off topic here whith it) lets me not retrieve the custom field Kursleiter.
    How I have to do this?

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ