token now deletes on activation

This commit is contained in:
nek0 2014-08-17 23:00:35 +02:00
parent a9bd79caf9
commit 88fc9feae7

View file

@ -15,5 +15,6 @@ getActivateR token = do
Just x -> do Just x -> do
userId <- runDB $ insert $ tokenUser (entityVal x) userId <- runDB $ insert $ tokenUser (entityVal x)
liftIO $ createDirectoryIfMissing True $ "data" </> (unpack $ extractKey userId) liftIO $ createDirectoryIfMissing True $ "data" </> (unpack $ extractKey userId)
runDB $ delete (entityKey x)
setMessage $ "User activated" setMessage $ "User activated"
redirect $ HomeR redirect $ HomeR