Skip to content

Commit

Permalink
Address #61 - Simultaneous expiration and user rights change
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPoppe committed Jan 10, 2024
1 parent 54bec2e commit 76d6cdc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ajax/edit_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
$requestedExpiration = urldecode($data['expiration']);
$requestedExpiration = \DateTimeRC::format_ts_to_ymd($requestedExpiration);
$requestedUnexpired = empty($requestedExpiration) || (strtotime($requestedExpiration) >= strtotime('today'));

// This import is requesting the user be expired
if ( !empty($requestedExpiration) && strtotime($requestedExpiration) < strtotime('today') ) {
$userExpired = true;
}

if ( $userExpired && !$requestedUnexpired ) {
$ignore = true;
}
Expand Down

0 comments on commit 76d6cdc

Please sign in to comment.