/**
* If a Shibboleth user requests a password reset, and the Shibboleth password
* reset URL is set, redirect the user there.
*/
function shibboleth_retrieve_password( $user_login ) {
$password_reset_url = shibboleth_get_option('shibboleth_password_reset_url');
if ( !empty($password_reset_url) ) {
$user = get_userdatabylogin($user_login);
if ( $user && get_user_meta($user->ID, 'shibboleth_account') ) {
wp_redirect($password_reset_url);
exit;
}
}
}
add_action('retrieve_password', 'shibboleth_retrieve_password');
Replace
get_userdatabylogin()
withget_user_by()
: https://github.com/michaelryanmcneill/shibboleth/blob/master/shibboleth.php#L229See more: https://developer.wordpress.org/reference/functions/get_userdatabylogin/ https://developer.wordpress.org/reference/functions/get_user_by/