Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mmalfatti

    (@mmalfatti)

    Thanks for the reply. My solution is using the following for the login link (which works great):

    echo '<a href="#login-box" class="login wpml-btn login-window">Login</a>';

    And then some simple custom code for the logout link (which is also good, although not part of your plugin):

    ob_start();
    wp_loginout('index.php');
    $mylink = ob_get_contents();
    ob_end_clean();
    echo $mylink;

    Regards

    Thread Starter mmalfatti

    (@mmalfatti)

    Please ignore. Solution is accessing the CORRECT fields in the WP_user object.

    Instead of

    $current_user->user_firstname;

    I have to use:

    $current_user->first_name;

    I was using a custom field and trying to update it with wp_update_user, which would not do it.

Viewing 2 replies - 1 through 2 (of 2 total)