Jump to content

Client Login Hook Not Working?


dan76

Recommended Posts

I created a simple hook to redirect a user to a page after logging out. Using the same logic, I tried creating another hook to redirect a user after logging in. However, this is not working.

 

Here's what I have:

 

<?php
function login_redirect($vars) {
header( 'Location: https://www.my-redirect-here.com' ) ;
}
add_hook("ClientLogin",1,"login_redirect");
?>

 

What could I be missing something?

Link to comment
Share on other sites

Yes, the file is included in the hooks directory. And even when I add the file name to the url the problem still persists.

 

Could this be a bug? I created a similar hook created for a redirect after logout, and this hook works perfectly (even without a file name). For some reason, the same logic is not working for the ClientLogin hook point.

Link to comment
Share on other sites

  • 7 months later...

Does anyone know how to update login hook function to not redirect when user is in new account creation and ordering process?

 

When hook is applied this is how it looks:

1. Client is choosing hosting plan

2. Entering his new account details

3. He is trying to checkout

 

and now instead of finishing order he is being redirected to place where login hook is redirecting and ordering process is not being finished.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated