mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Update promotion handling when not changing role
This commit is contained in:
@@ -204,6 +204,18 @@ class AdminUserController extends BasePageController
|
||||
$originalRoleChangeDate // Pass original expiry for history
|
||||
);
|
||||
$editedUser->refresh();
|
||||
} elseif (!$roleChanged && $request->input('role') !== null) {
|
||||
// Role isn't changing, but we should still apply promotions if there are any
|
||||
// This handles the case where admin extends expiry date for existing role
|
||||
User::updateUserRole(
|
||||
$editedUser->id,
|
||||
(int) $request->input('role'), // Same role
|
||||
true, // Apply promotions
|
||||
false, // Don't stack (not changing role)
|
||||
$changedBy,
|
||||
$originalRoleChangeDate
|
||||
);
|
||||
$editedUser->refresh();
|
||||
}
|
||||
|
||||
// Update user basic information (but NOT the role - it's handled above)
|
||||
|
||||
Reference in New Issue
Block a user