@holdusback,
Good evening, this is not really a functinality of this plugin.
This is a WordPress core functinality and I have been looking for it but I have not found too much.
If someone know something about it, please help us.
@holdusback,
As I have seen in the code, you can use this one now.
Because the check is done making a sum of the sending key date plus this data.
So this will be ok for you.
Look for this one in the core:
/**
* Filters the expiration time of password reset keys.
*
* @since 4.3.0
*
* @param int $expiration The expiration time in seconds.
*/
$expiration_duration = apply_filters( 'password_reset_expiration', DAY_IN_SECONDS );
if ( false !== strpos( $row->user_activation_key, ':' ) ) {
list( $pass_request_time, $pass_key ) = explode( ':', $row->user_activation_key, 2 );
$expiration_time = $pass_request_time + $expiration_duration;
} else {
$pass_key = $row->user_activation_key;
$expiration_time = false;
}
Sorry but I dont really understand …
I have to look for this code in the core file of wordpress ?
Do I have to change something in the core code of wordpress ? …
A big thanks for you’re support.
EDIT : Im leaving the office for now… will check this topic on monday morning !
Anyway a big thanks for you’re anwser,
Have a good week end !
-
This reply was modified 8 years, 1 month ago by
holdusback.
No, you have to create a plugin or include it into your functions.php
add_filter( 'password_reset_expiration', function( $expiration ) {
return MONTH_IN_SECONDS;
});
Thanks to you, remember to give us a little donation or leave a good review for this plugin ๐
Hello there,
Ok, I’ll add it in my function.php.
But I dont understand what the var “MONTH_IN_SECONDS” is ?
How can I specifies a time ? (like a week)
Rated u 5 stars !
Thank you ๐
So it would be something like:
7 * 24 * 3600
Number of days * hours * seconds in an hour.
So it would do :
7 * 24 * 3600 = 604800
604800 is 25200 days :s ?
I only want something like 1 week or 2 …
604800 in seconds is a week
Two weeks would be 2 weeks * 7 days/week * 24 hours/day * 3600 seconds/hour
Oh it was in sec okay.
Ok so I’ve putted 2592000 (one month).
The timestamp in the database is the time that the reset password was created (not the time it will be expired) So, everything is okay !
The user I’ve inserted 1 week ago have those reset password link work again.
A big thanks for you’re support !
๐
thanks for your review, any little donation would be really highly appreciated.
If you need something more with WordPress or WooCommerce we are available ๐