• Resolved Jean-Michel Ferrard

    (@jean-michel-ferrard)


    Hi there

    When some user is logged on my website, the [pms-login] shortcode prints something like :
    “You are already logged in as ” {{firstname}} {{lastname}}.

    I would like this shortcode to print
    “You are already logged in as ” {{username}}.

    Is it possible ?

    PS: the shortcode [wppb-login] uses {{username}}

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support madalinaruzsa

    (@madalinaruzsa)

    Hi @jean-michel-ferrard,

    I saw that you opened tickets on our support channel but unfortunately, it seems we can’t send you emails to the email address from which you opened the tickets. I’m not sure why. Could you please open a ticket from another email next time to avoid this situation?

    You can use the following code to change that text:

    add_filter( ‘pms_login_form_logged_in_message’, ‘pmsc_change_logged_in_message’, 20,2 );

    function pmsc_change_logged_in_message( $output, $user_id )

    { $redirect_url = apply_filters( ‘pms_login_form_logout_redirect_url’, $atts[‘logout_redirect_url’] );

    $logout_url = ‘‘ . __( ‘Log out’, ‘paid-member-subscriptions’ ) . ‘‘;

    $user = get_userdata( $user_id );

    return ‘<p class=”pms-alert”>’ . sprintf( __( ‘You are currently logged in as %s.’, ‘paid-member-subscriptions’ ), $user->user_login ) . ‘ ‘ . $logout_url . ‘</p>’;
    }

    You can use this code by adding it to your theme’s ‘functions.php’ file or by creating a new plugin as described here.

    Kind regards,
    Madalina Ruzsa
    Cozmoslabs

    • This reply was modified 3 years, 7 months ago by madalinaruzsa.
    Thread Starter Jean-Michel Ferrard

    (@jean-michel-ferrard)

    Thanks for your support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[pms-login] when already logged’ is closed to new replies.