Verified Commit bf36054c authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #512 TIME 0:30 Disable all user basket redirections before set absence config

parent 6ad51809
...@@ -2195,6 +2195,10 @@ class UserController ...@@ -2195,6 +2195,10 @@ class UserController
$today = new \DateTime(); $today = new \DateTime();
if ($today > $absenceStartDate) { if ($today > $absenceStartDate) {
UserModel::update(['set' => ['status' => 'ABS'], 'where' => ['id = ?'], 'data' => [$absentUser['id']]]); UserModel::update(['set' => ['status' => 'ABS'], 'where' => ['id = ?'], 'data' => [$absentUser['id']]]);
RedirectBasketModel::delete([
'where' => ['owner_user_id = ?'],
'data' => [$absentUser['id']]
]);
if (!empty($absentUser['absence']['redirectedBaskets'])) { if (!empty($absentUser['absence']['redirectedBaskets'])) {
UserController::redirectBasket([ UserController::redirectBasket([
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment