Notifications
Clear all

[Closed] How to redirect user after login using a custom login page?

7 Posts
2 Users
0 Reactions
1,190 Views
copilot
Posts: 26
Topic starter
(@copilot)
Eminent Member
Joined: 5 years ago

Hi team,

When viewing a forum post as a guest, a login link is shown below the topic and in the profile widget.

For signing in we use a custom page (Woocommerce), which is entered at Forum Settings > Login & Registration > Custom Authorization URLs.

Now when clicking any of the login buttons/ link at the forum there is no url query added:
     /?redirect_to=

The result is that after login the user is not redirected to the forum post it was viewing but to the webshop account page.

Is this a bug or intended behavior? And when intended, is it possible to add the option to redirect back to the forum post? When I manually add the URL query to our Woocommerce login page, it works.

 

EDIT: When the custom login url is removed, the redirect query is correctly added.

 

Cheers!

6 Replies
Chris
Posts: 3650
(@chris)
Famed Member
Joined: 3 years ago

Hi @copilot,

This is not related to wpForo as when you use WooCommerce login, wpForo redirection functionality, which has to take the user back to the post, doesn't work there.

You have to use wpForo login fields to use wpForo redirection functionality.

And it doesn't matter where was the user before logging in, the redirection is all on WooCommerce in that case.

copilot
Posts: 26
Topic starter
(@copilot)
Eminent Member
Joined: 5 years ago

Hi Chris,

Many thanks for your switch reply. I am sorry for being not clear enough in my original post. The redirection functionality does work on the WooCommerce login page.

See this link to the WooCommerce login page on gVectors.

https://gvectors.com/my-account/?redirect_to=https%3A%2F%2Fgvectors.com%2Fforum%2Fofficial-wpforo-addons%2Fannual-fees%2F

 

Cheers,

Tim

1 Reply
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@copilot,

Posted by: @copilot

For signing in, we use a custom page (Woocommerce), which is entered at Forum Settings > Login & Registration > Custom Authorization URLs.

As you mentioned, you are not using wpForo login/reg page, but a custom page. So in that case, wpForo redirection cannot work.

Try to log in Gvectors and you will see wpForo login/reg field, not a custom one. And that's why wpForo Reg works in Gvectors.

 

copilot
Posts: 26
Topic starter
(@copilot)
Eminent Member
Joined: 5 years ago

Thank you Chris,

I understand now that it is intended behavior and not a bug. Would it be possible for your team to add the redirect feature to the Custom Authorization URLs as well?

Cheers,
Tim

copilot
Posts: 26
Topic starter
(@copilot)
Eminent Member
Joined: 5 years ago

@chris ?

1 Reply
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3650

@copilot,

Sorry for such a late response, I have lost your topic, the Forum is really heavy.

About the Authorization URL's: wpForo cannot override on other plugin's redirection functionality, by the URL set in the Authorization URL's field.

I'm sorry, but we cannot do there anything.