/wp-admin/customize.php can't be navigated to with wp_redirect()
|Reported by:||brianfeister||Owned by:|
|Component:||Login and Registration||Keywords:||reporter-feedback|
With WordPress Multisite, programmatically creating a new user, with $activate_signup(), then logging that user in via wp_signon()works, but when trying to automatically move the user the theme customizer page (the focus of my Multisite network), I get a "Session expired. Please log in again. You will note move away from this page." Clicking "close" on the customizer frame takes the user back to the dashboard without asking for authentication. Is this happening because the Theme Customizer is in some way different than other wp-admin areas and cannot be the "first-navigated" admin page when a user initially authenticates?
This may be a bug or a feature request, I would need some clarification.
activate_signup = wpmu_activate_signup(); $creds = array(); $creds['user_login'] = $passed['username']; $creds['user_password'] = $activate_signup['password']; $creds['remember'] = true; $user = wp_signon( $creds, false ); wp_redirect( 'http://' . $subdomain . '/wp-admin/customize.php' ); // $subdomain is captured via a signup form and is outside this snippet exit();
Change History (3)
comment:2 @jeremyfelt — 20 months ago
- Component changed from Multisite to Login and Registration
- Focuses multisite added
- Keywords close removed
- Milestone Awaiting Review deleted