summaryrefslogtreecommitdiff
path: root/includes/model/Shifts_model.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/Shifts_model.php')
-rw-r--r--includes/model/Shifts_model.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 6f422c32..6bb17cf2 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -325,6 +325,10 @@ function Shift_signup_allowed_angel(
return new ShiftSignupState(ShiftSignupState::NOT_ARRIVED, $free_entries);
}
+ if (config('signup_advance_hours') && $shift['start'] > time() + config('signup_advance_hours') * 3600) {
+ return new ShiftSignupState(ShiftSignupState::NOT_YET, $free_entries);
+ }
+
if (empty($user_shifts)) {
$user_shifts = Shifts_by_user($user->id);
}