fix(lms): transmit renewed pins to lms

This commit is contained in:
Steffen Jost 2023-03-03 15:24:05 +00:00
parent dd53601bbd
commit be3fb39171

View File

@ -586,7 +586,7 @@ postLmsR sid qsh = do
forM_ okUsers $ \(Entity lid LmsUser {lmsUserUser = uid, lmsUserQualification = qid'}) -> do forM_ okUsers $ \(Entity lid LmsUser {lmsUserUser = uid, lmsUserQualification = qid'}) -> do
when (isRenewPinAct action) $ do when (isRenewPinAct action) $ do
newPin <- liftIO randomLMSpw newPin <- liftIO randomLMSpw
update lid [LmsUserPin =. newPin, LmsUserDatePin =. now] update lid [LmsUserPin =. newPin, LmsUserDatePin =. now, LmsUserResetPin =. True]
when (isNotifyAct action) $ when (isNotifyAct action) $
queueDBJob $ JobSendNotification { jRecipient = uid, jNotification = NotificationQualificationRenewal qid' } queueDBJob $ JobSendNotification { jRecipient = uid, jNotification = NotificationQualificationRenewal qid' }
return $ length okUsers return $ length okUsers