Last active
June 22, 2017 21:53
-
-
Save NichlasB/6255c0e3848c229ca6f3864c12a33ed5 to your computer and use it in GitHub Desktop.
Set Duration for Password Reset Link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
/** | |
* password-reset-link-duration.php | |
*/ | |
add_filter( 'password_reset_expiration', 'cf_password_reset_link_expiration', 99, 1 ); | |
function cf_password_reset_link_expiration($seconds){ | |
$iDays = 7; // Set number of days | |
$iExpiration = $iDays*24*60*60; | |
return $iExpiration; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment