• The #1 complaint with the website is users do not stay logged in over time, even if they tick the stay logged in checkbox on the login page they report they have to login every single time.

    This doesn’t happen to me and I can’t seem to recreate the issue. I’ve searched the forums and docs but I’d really like to know what I can do to track this down.

    The UM plugin is V2.6.9 (very recent) on WordPress V6.2.2 also pretty recent.

    Really appreciate any help.

    Thanks,

    Mark

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • missveronica

    (@missveronicatv)

    @markahunt

    The default WordPress behavior for logging a user out is to make
    a login session cookie that expires in 48 hours or when the browser is closed.

    If the “Remember Me” box is checked, WordPress will give you 14 days
    before forcing you to login again.

    If you want to increase the expiration, you can try adding the following
    code snippet to increase to 1 year:

    add_filter( 'auth_cookie_expiration', 'um_021121_keep_me_logged_in_for_1_year' );
    
    function um_021121_keep_me_logged_in_for_1_year( $expirein ) {
        return YEAR_IN_SECONDS;
    }
    Thread Starter markahunt

    (@markahunt)

    Hi and thanks for the super quick reply!

    Its not timing out as users report this happening even when they tick the “Keep me logged in” checkbox – and just so I’m clear I’m referring to the Ultimate Member plug login page, not the default WordPress one if that makes a difference?

    But I’d imagine browser cookie settings would then affect this as well?

    missveronica

    (@missveronicatv)

    @markahunt

    UM is using the WP function for “Remember me”
    There are many ways to get cookies deleted by browser settings or GDPR/cookie plugins.

    From WP code comments:

     * Sets the authentication cookies based on user ID.
     *
     * The $remember parameter increases the time that the cookie will be kept. The
     * default the cookie is kept without remembering is two days. When $remember is
     * set, the cookies will be kept for 14 days or two weeks.
    Plugin Support andrewshu

    (@andrewshu)

    Hi @markahunt

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

    Thread Starter markahunt

    (@markahunt)

    HI there’s been no resolution so this is still open.

    I’m waiting for some comments that would help me track down possible causes of why the stay-logged-in function should work for some users not others.

    Be happy to provide any info required. Thanks for any help here.

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Users do not stay logged in’ is closed to new replies.