Closed Alhrath closed 5 years ago
I would like to get @jrchamp's thoughts on this before approving this PR.
I've done some testing on a single site and it's definitely a better experience to have a working login link with an appropriate return_to. However, because $wp->request
is null on the normal login page, the experience was worse. I found this to be better (overriding the URL only when it was available):
global $wp;
$url = false;
if ( isset( $wp->request ) ) {
$url = wp_login_url( home_url( $wp->request ) );
}
$login_url = add_query_arg( 'action', 'shibboleth', $url );
I'll take a look at the experience on multisite and follow up. EDIT: Working as expected. Not sure what else to test.
Ok like this ?
Yes, mostly. There shouldn't be any spaces used to indent, because WordPress uses tabs to indent.
Sorry, I know my comment uses spaces because the github comment box doesn't make adding tabs easy.
This looks good to me. Merging.
Here is a general fix to take into account the situation where the login form is displayed outside the login page, for instance when a theme display a login form in a menu or as a widget.