• Resolved cedric41

    (@cedric41)


    Since it’s not possible to make the dashboard page as the home page, I have created a Login Page for my home page, and the student is redirected to his dashboard page when he login.

    But if the student is already logged, when he goes to the home page, the form not appear, and he is not redirected:

    Is it normal ?
    There is even no message that explains that he is already logged, so when that happen we don’t even know what to do…

    Is there a way to fix that please ?

    Cedric

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

Viewing 1 replies (of 1 total)
  • @cedric41,

    You’re dealing with a complicated set of issues here… The “workaround” to add the login shortcode on the homepage to make it work as the homepage is the result of a bug that we have yet to determine how to fully resolve. It’s a longstanding issue that exists as a result of how custom endpoints work in the WordPress core.

    The login shortcode itself intentionally outputs no content when logged in because you cannot login when you’re already logged in. That shortcode was conceived of to be added to widget areas (a sidebar, for example) and be 100% invisible when logged in.

    We’ve been struggling with whether or not to implement an automatic redirect when a user visits a page with a login shortcode when they’re already logged in and the shortcode has a redirect attribute. However, it would require us to check EVERY PAGE LOAD to see if the shortcode is present and then also programmatically determine if a redirect SHOULD be executed.

    Since this is a performance concern and we find a very small number of users are affected by this combination of issues we have — as of yet — opted to leave it standing. Here’s the issue report and related discussion: https://github.com/gocodebox/lifterlms/issues/563

    For now, the best thing I could recommend would be to change your website to NOT require the student dashboard on the home page of your site or use a plugin like this one (https://www.ads-software.com/plugins/user-access-shortcodes/) to add some text that only displays to logged in users which could be a link to the *real* dashboard page.

    I realize neither of these solutions is ideal but I don’t really have any other solutions for you at this moment.

    My apologies,

Viewing 1 replies (of 1 total)
  • The topic ‘Login Page: Not redirected when already logged’ is closed to new replies.