Redirects after sign up & login

This topic contains 14 replies, has 4 voices, and was last updated by  Giri 7 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #365486

    Guy Willett
    Buyer
    Post count: 41

    Hello,

    I’m struggling a bit so any help would be much appreciated.

    After sign up I would like the user to be redirected to the add listing page. After log in I would like the user to be redirected to their dashboard. It seems like the default when using the /gd-login/?signup=1 URL for sign up and when using /gd-login (or the loginbox widget) for log in is to redirect to the home page.

    So, for sign up I used this URL http://www.preview.pembrokeshirewebdesign.com/gd-login/?redirect_add_listing=http://www.preview.pembrokeshirewebdesign.com/add-listing/ which worked fine.

    For login I used Peter’s Login Redirect plug-in and set the subscriber login redirect to http://www.preview.pembrokeshirewebdesign.com/author/%5Bvariable%5Duserslug%5B/variable%5D/?geodir_dashbord=true&stype=gd_place which also worked fine. I thought I’d been quite smart (wrong again) but that overrides the sign up redirect. The plug-in has an option for ‘post registration’ redirect but that doesn’t work.

    Any ideas on how I can achieve what I want?

    Thanks

    Guy

    #365506

    Guust
    Moderator
    Post count: 29970

    I guess it is not the signup that redirects, but the simultaneous login.
    GD will redirect to whatever page the user was viewing when asked to login, that is standard behavior rather than sending somebody to another page than they were expecting.

    I’ll get the others to look at your question too, because I have no better answer than that.

    #365713

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    currently with GD there’s no way because both forms are on the same page.

    With the new plugin that we are about to release that will be possible because the forms are in 2 separate pages.

    It’s still in Beta, but it’s almost ready for production if you want to test it: https://wpgeodirectory.com/support/topic/userswp-beta-gd-integration-uwp-recaptcha/

    Here you find the link to the latest stable: https://wpgeodirectory.com/support/topic/userswp-beta-gd-integration-uwp-recaptcha/page/3/#post-364866

    Let us know how it goes,

    Thanks

    #365752

    Guy Willett
    Buyer
    Post count: 41

    Thanks very much for this.

    I installed the plug-in but I’m still struggling to achieve what I want.

    I see that UsersWP has a Login Redirect Page but I can’t see how that can be used to redirect users to their dashboard and there’s no option for redirecting after registration.

    I tried using http://www.preview.pembrokeshirewebdesign.com/register/?redirect_add_listing=http://www.preview.pembrokeshirewebdesign.com/add-listing/ but that just redirects to the home page after registration. Is there another URL based on /register/ that I can use to redirect to the Add Listing page? And one based on /login/ to get to the dashboard? I’m probably showing my ignorance here but I’d be really grateful for any further help on this.

    Peter’s Login Redirect does not seem to work at all with UsersWP activated.

    #365754

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    for the login just redirect to the profile page. For the registration redirect I asked to the developers to let us know how to.

    Thanks for your patience,

    #365774

    Guy Willett
    Buyer
    Post count: 41

    That redirects fine but then there doesn’t seem to be a way to access the dashboard or listings from the profile page. I tried using the GD Author Right Sidebar widget on the profile page but the My Listings link doesn’t work (stays on same page) – the Add Listing link does work.

    Look forward to hearing from you.

    #365780

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    UsersWP takes over the author page, you need to install the UsersWP GD Integration too…

    You find it on the same post where you downloaded the UsersWP plugin.

    Thanks

    #365785

    Guy Willett
    Buyer
    Post count: 41

    Sorry, I should have spotted that. I’ve done that now but I can’t see that integration settings page anywhere.

    I see the attached page via UsersWP>Profile – should it be there?

    #365797

    Paolo
    Site Admin
    Post count: 31206

    Di you activate the add-on?

    The link would appear below the Notifications link in the left column menu…

    #365839

    Guy Willett
    Buyer
    Post count: 41

    Yes I did. I also deactivated/reactivated it, installed it again, deactivated all other plug-ins, changed themes etc. – stlll can’t see the link unfortunately (see attached).

    Could it be anything to do with using the latest stable version of UsersWP instead of the one shown with the Integration plug-in link?

    Thanks for helping with this. Looks like this will solve the login redirect part of what I want to do when we get it working. I look forward to any thoughts on the registration redirect.

    #365909

    Giri
    Expired Member
    Post count: 3155
    This reply has been marked as private.
    #365928

    Guy Willett
    Buyer
    Post count: 41

    That works now, thank you! That’s the login redirect sorted. Any idea how I can redirect to the Add listing page after registration?

    This still works http://www.preview.pembrokeshirewebdesign.com/gd-login/?redirect_add_listing=http://www.preview.pembrokeshirewebdesign.com/add-listing/ but I’d like to use the UsersWP registration page/form.

    I was hoping the below would work but it redirects to the home page –
    http://www.preview.pembrokeshirewebdesign.com/register/?redirect_add_listing=http://www.preview.pembrokeshirewebdesign.com/add-listing/

    #365934

    Giri
    Expired Member
    Post count: 3155

    For registration redirect, I have just added a filter.

    You need to replace this line

    wp_redirect(home_url('/'));

    with

    
    
    $regsiter_redirect = apply_filters('uwp_register_redirect_url', home_url('/'));
    wp_redirect($regsiter_redirect);

    See here

    https://github.com/mistergiri/userswp/commit/603b595675680fa562fcbcc68c3ef7692088e84f#diff-d34f7139a74ad88b26a2e16c0b825ce5L313

    Once thats done, add the following snippet in your code snippets

    
    
    add_filter('uwp_register_redirect_url', 'modify_uwp_register_redirect_url');
    function modify_uwp_register_redirect_url() {
         return get_permalink(geodir_add_listing_page_id());
    }

    Thanks

    #365971

    Guy Willett
    Buyer
    Post count: 41

    Fantastic, that’s done the trick. Many thanks for your help – really excellent support.

    #365972

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

Viewing 15 posts - 1 through 15 (of 15 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket