• Resolved guidetti

    (@guidetti)


    I’m using this shortcode but the same user logged in it shows the login form
    [theme-my-login action=”login” show_links=”0″]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    I’m not sure I understand your question, but it sounds like maybe it could be a server-side caching issue?

    Thread Starter guidetti

    (@guidetti)

    It’s not a cache issue. I’m using shortecode to embed the login form on my site’s homepage. The same user already logged in to the site when entering the home page he presents the login form again, it would be right to present a message You are already logged in and the login form does not appear again. Even already logged into the site.

    Thread Starter guidetti

    (@guidetti)

    Here is the problem the plugin is not working as it is in the documentation. If you have an active login, you should require a panel with options and not a login form again.

    Link doc:

    https://docs.thememylogin.com/article/88-modifying-the-user-panel

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Do notice the bold in the documentation quote:

    When the widget is active with Log In selected as it’s action, a “user panel” will be shown instead of the login form.

    You can add a filter to hide it when logged in:

    
    add_filter( 'tml_shortcode', function ( $content, $action ) {
        if ( 'login' == $action && is_user_logged_in() ) {
            return '';
        }
        return $content;
    }, 10, 2 );
    
    Thread Starter guidetti

    (@guidetti)

    It worked to hide the login form after login, now I need to know which shortcode to display the user panel? Because nothing appears, not even the name of the logged in user.

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Use the widget.

    Thread Starter guidetti

    (@guidetti)

    Problem with using widget is that it is not customized and not translated into Portuguese.

    How to remove Dashboard and Edit Profile links?

    Thread Starter guidetti

    (@guidetti)

    Another widget usage issue is invalid user password error messages or recaptch failure not working properly.

    Thread Starter guidetti

    (@guidetti)

    I just need you to hide login if the user is already logged in. Displays message “ALREADY LOGGED IN!”

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Using the code I already provided, simply return some content instead of an empty string:

    
    add_filter( 'tml_shortcode', function ( $content, $action ) {
        if ( 'login' == $action && is_user_logged_in() ) {
            return 'ALREADY LOGGED IN!';
        }
        return $content;
    }, 10, 2 );
    
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘message appears that you are already logged in’ is closed to new replies.