diff --git a/src/Handler/LMS.hs b/src/Handler/LMS.hs index 26b5abb9c..d3b2d8f4d 100644 --- a/src/Handler/LMS.hs +++ b/src/Handler/LMS.hs @@ -396,7 +396,7 @@ mkLmsTable isAdmin (Entity qid quali) acts cols psValidator = do ] dbtFilter = mconcat - [ single $ fltrUserNameEmail queryUser + [ single $ fltrUserNameEmail queryUser , single ("lms-ident" , FilterColumn . E.mkContainsFilterWith (Just . LmsIdent) $ views (to queryLmsUser) (E.?. LmsUserIdent)) -- , single ("lms-status" , FilterColumn . E.mkExactFilterLast $ views (to queryLmsUser) ((E.>=. E.val nowaday) . (E.^. LmsUserStatus))) -- LmsStatus cannot be filtered easily within the DB -- , single ("validity" , FilterColumn . E.mkExactFilterLast $ views (to queryQualUser) ((E.>=. E.val nowaday) . (E.^. QualificationUserValidUntil))) @@ -586,7 +586,7 @@ postLmsR sid qsh = do forM_ okUsers $ \(Entity lid LmsUser {lmsUserUser = uid, lmsUserQualification = qid'}) -> do when (isRenewPinAct action) $ do newPin <- liftIO randomLMSpw - update lid [LmsUserPin =. newPin, LmsUserDatePin =. now] + update lid [LmsUserPin =. newPin, LmsUserDatePin =. now, LmsUserResetPin =. True] when (isNotifyAct action) $ queueDBJob $ JobSendNotification { jRecipient = uid, jNotification = NotificationQualificationRenewal qid' } return $ length okUsers