From 1a8c816d947f8a99dd18458a9ba671e56c54d3a7 Mon Sep 17 00:00:00 2001 From: Tom Naessens Date: Wed, 31 Jan 2024 10:18:09 +0100 Subject: [PATCH] Enqueue fetch (enrolled) clubs job when user signs in --- app/models/user.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 92460354..cc72b023 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -34,7 +34,13 @@ def cas_extra_attributes=(extra_attributes) self.cas_uid = value end end + self.save! + + if self.cas_ugentStudentID # rubocop:disable Style/GuardClause + enqueue_fetch_club + enqueue_fetch_enrolled_clubs + end end # return Givenname + surname or username if these don't exist