yst14
Forum Replies Created
-
The hidden form field on the registration form has the homepage url as the redirect_to value, not the value I set in the user role
I’ve been looking at the request headers and I added some logging into the plugin to check and the plugin is redirecting to my homepage upon registration despite me setting a different URL within the Subscriber Role settings (priority 999)
I do have a url in here. I removed it for the screenshot for privacy purposes.
When completing the registration, the user is taken back to the registration form despite this being setup correctly.
If I use the registration complete hook, the approval process breaks, as explained in previous comments.
I have found the cause which was a custom function in our theme related to redirecting the user after registration.
– The user wasn unable to login which is correct
– The user wasn’t redirected as per our admin settingsThe issue we had was the setting to redirect the user to a URL was not working in the plugin so we created the below
/** * Redirect after registration **/ add_action( 'um_registration_complete', 'iuk_registration_complete', 10, 2 ); function iuk_registration_complete( $user_id, $args ) { // Get the custom thank you page url from the theme settings $url = get_field('registration_redirect_page', 'option'); // Redirect the user to the custom thank you page wp_redirect( $url ); // Stop execution to prevent the page loading for any reason exit; }
Disabling this, it works fine but the redirect doesn’t work.
So the next question is, how can we redirect the user to our given URL without breaking the user registration/approval?
- This reply was modified 4 years, 11 months ago by yst14.
These are screenshots of our current settings:
https://ibb.co/Lvtj1BF
https://ibb.co/hF6mxrC
https://ibb.co/G9DPrZS
https://ibb.co/PcbRtbSHi @champsupertramp only 1 user role is assigned
So, after much investigation I have found that upon registering, the users account_status is set to ‘pending’ when it should be set to ‘awaiting_admin_review’
In the database, the account_status key is ‘pending’ but in WordPRess Admin the status is empty and the UM Dashboard shows no users as pending
just to add to this, the user status is empty and do not show in pending review.
2.1.2 is what i am using. I updated today to make sure. The page just refreshes and goes back to the account tab if the form is empty. I’m unable to share publicly a recording of this.
I am using WPML on the site
@avetorat I ended up using the registration complete hook to manage my redirects
https://docs.ultimatemember.com/article/1234-umregistrationcomplete
I am having this/very similar problem. When setting a URL for my subscriber role to be redirected to upon registration they are just being redirected to the homepage. I’ve ensured that the page I am redirecting to is in the whitelist so login isn’t required.
Update… WPML works with ultimate member on twenty nineteen but not on my theme. Disabling wpml when my theme is enabled allows ultimate member to change page but the forms are still display none. no css overrides in my theme either and no errors via wp_debug or console
It appears to be a conflict with WPML which is quite a big problem for us on this project, any suggestions?
Thanks