mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-04 08:41:50 +02:00
Fixed #223
This commit is contained in:
parent
887c85c51e
commit
0bf30ff362
4 changed files with 22 additions and 1 deletions
|
@ -884,6 +884,15 @@ function checkPasswordComplexity($password) {
|
|||
}
|
||||
|
||||
function checkPasswordRenewal($lastPasswordUpdateTimestamp) {
|
||||
// Check if expiration should be skipped for this user
|
||||
$skipList = envi('PASSWORD_EXPIRATION_SKIP_USERS');
|
||||
if ($skipList) {
|
||||
$skipUsers = array_map('trim', explode(',', $skipList));
|
||||
if (in_array($_SESSION['auth_username'], $skipUsers, true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Use configured or default password expiration days
|
||||
$passwordExpiryDays = envi('PASSWORD_EXPIRATION_DAYS') ?: 90; // Default to 90 days
|
||||
|
||||
|
|
|
@ -47,4 +47,6 @@ NICKY_API_KEY='nicky-api-key'
|
|||
SUMSUB_TOKEN=
|
||||
SUMSUB_KEY=
|
||||
|
||||
TEST_TLDS=.test,.com.test
|
||||
TEST_TLDS=.test,.com.test
|
||||
|
||||
PASSWORD_EXPIRATION_SKIP_USERS=admin,superadmin
|
Loading…
Add table
Add a link
Reference in a new issue