• Resolved mokana

    (@mokana)


    Hi!

    This is a small foot print Plugin that worked flawlessly using the shortcode. The only thing that seems to be lacking is setting a redirect for LOGIN for users other than Admin. I cannot set the <input type=”hidden” name=”redirect_to” value=””> redirect on the short code.

    Any guidance on this? I am blocking access to users and even the Admin I want to send to the home page forcing the Admin to know how to get to the Admin dashboard.

    thanks

    great plug in.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter mokana

    (@mokana)

    I now see that I can send a user via the settings to where ever I want and that could be the home page. my bad. I think it works flawlessly so far.

    Thread Starter mokana

    (@mokana)

    Nope! I spoke too soon. The only user that immediately redirects to the Account Page is the Admin. I have another plugin that I am using that blocks all non admins from the dashboard and redirects them to the homepage, which is what it is doing right now. Which is what I wanted, but then I kind of liked the redirect to the Account Page.

    I have themed pages set up for each flow. I tried out this plugin because of the short codes and the ability to place them exactly where I want them to be. It would be sweet to be able to deactivate the other plug in and be able to redirect using this plug to the account area or where ever i want them to go.

    Thanks

    Thread Starter mokana

    (@mokana)

    ok . . . there is an issue . . I have narrowed it down to your plugin. I have deactivated all other plugins.

    I set to where the Admin does not redirect to admin. When you first login, it goes to the Account info Page as selected in the Admin settings of you plugin. Then you navigate away from it to another section, then when you want to get to the Client Account information again. . . and icon is clicked and . . .

    I have code that performs this operation:

    <?php if (is_user_logged_in()) { ?>

    <?php include ‘client-account.php’; ?>

    <?php } else { ?>

    <?php include ‘client-login.php’; ?>

    <?php } ?>

    I removed the inner code so that it is just this:

    <?php if (is_user_logged_in()) { ?>

    <?php } ?>

    This single call causes the user to always be redirected to the Admin Dashboard if Admin is logged on and to the Home Page if another user.

    I then deactivated your plugin and it works as expected.

    Bummer . . . great little plugin . . . I hope this is a quick fix. I like it.

    Thread Starter mokana

    (@mokana)

    I am trying to give you as much information as possible.

    I deactivated your plugin and everything worked as I expected.

    When I reactivated the plugin, all the settings under the Pages tab went back to their default settings.

    And . . . my code worked as expected.

    But . . . this messed up the Login Flow, so I set the Page Settings back to my Custom pages.

    And the problem came back . . .

    For non admin . . . you can watch the URL and it dances all over the place . . .tries to fire off a profile.php . . .which I guess is your stuff, then settles down onto the home page . . .

    Logoff . . . login as admin . . . it goes directly to the account page. I click on the Account link as described above and bam . . . right to the Admin Dashboard . . .

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @mokana,

    Just wanted to let you know I am here and am reading this. Give me a few minutes…

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Can you show me the full snippet you have for including client-login.php and client-account.php?

    Also, could you send me a screenshot of our plugin’s settings?

    I am sure the redirect you’re trying to do is possible but I’m having a hard time understanding what’s going on.

    Thread Starter mokana

    (@mokana)

    Hi.

    Thanks for the quick response.

    The code snippet is actually all there is.

    <?php if (is_user_logged_in()) { ?>

    <?php include ‘client-account.php’; ?>

    <?php } else { ?>

    <?php include ‘client-login.php’; ?>

    <?php } ?>

    I call this at the top of a Page and then decide how I want to build out the HTML. This is at the very top and a Redirect happens and neither of these two files are included.

    I would give you snap shot of the setting but I deleted everything but what I had before hand to make sure my stuff was running. On the first tab I had turned off redirect Admin to the Dashboard. On the Pages tab I set the Login to my Custom page and the Account to my Custom account and the rest I did not get to.

    I have one plugin WPS HIDE LOGIN that I use to rename the wp-login . . . other than that, I turned every other Plugin off to test and isolate your plugin and narrow down the problem area.

    Thanks again . .

    I want to use you plugin though if this can be resolved.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hmm. I am not sure what’s going… Have you tried using our filter 'yikes-custom-login-login-redirect-url'? Are you familiar with filter functions?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘REDIRECT ON LOGIN’ is closed to new replies.