[Feature request] Add option to remove password reset functionality
-
A client of mine has requested to completely deactivate the password reset function of WordPress and to ‘hide’ the ‘Lost your password?’ link on the login form. Even if this is perhaps an edge case, a simple toggle in ASE would be extremely helpful!
My quick & dirty solution was something like the following:/**
* Remove the "Lost your password?" link from the login form.
*/
add_action(
'login_form',
function () {
?>
<style type="text/css">
.login #nav a[href*="lostpassword"] {
display: none;
}
</style><?php
}
);
/**
* Disable password reset functionality.
*
* @param bool $allow Whether to allow password reset. Default true.
* @return bool False to disable password reset.
*/
add_filter(
'allow_password_reset',
function ($allow) {
return false;
}
);
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.