bcc-code / bcc-wp

[BCC IT] Custom Wordpress themes and plugins which can be used in any BCC application (currently includes the BCC Login plugin)
Apache License 2.0
0 stars 7 forks source link

Remove added query parameters after login redirect #135

Open JakubC-projects opened 1 year ago

JakubC-projects commented 1 year ago

Makes following changes to improve robustness of the login redirect

  1. Use redirects without schema - on some PHP environments (kinsta) $_SERVER['REQUEST_SCHEMA'] is not available, so to make sure redirects work in those environments we omit schema from redirect links
  2. Going directly to /wp-login.php redirects to home page after login, not wp-admin - This behavior used to depend on whether permalink structure was set to plain or pretty; this difference doesn't make sense and we should consolidate on always redirecting to home page, if someone wants to directly access the admin panel they should go to /wp-admin
  3. Only use host for validating redirects, this had to be done, so the redirects without schema work.