fixes #2281 add two default conf for reset and activation link

When a password activation or reset link is generated, the link expiry time is now defined in two conf: $conf[’password_reset_duration‘] with a default time of one hour and $conf[’password_activation_duration‘] with a default time of 72 hours.
This commit is contained in:
Linty
2024-11-20 17:09:26 +01:00
parent 431cb4b7b4
commit 34296598d4
10 changed files with 72 additions and 37 deletions

View File

@@ -76,11 +76,11 @@ function process_password_request()
return false;
}
$generate_link = generate_reset_password_link($user_id);
$generate_link = generate_password_link($user_id);
$userdata['activation_key'] = $generate_link['activation_key'];
// $userdata['activation_key'] = $generate_link['activation_key'];
$email_params = pwg_generate_reset_password_mail($userdata['username'], $generate_link['reset_password_link'], $conf['gallery_title']);
$email_params = pwg_generate_reset_password_mail($userdata['username'], $generate_link['password_link'], $conf['gallery_title'], $generate_link['time_validation']);
if (pwg_mail($userdata['email'], $email_params))
{