diff --git a/config/models b/config/models index 59255f3..5471c47 100644 --- a/config/models +++ b/config/models @@ -33,6 +33,7 @@ Person verifiedKeyCreated UTCTime resetPassKey Text resetPassKeyCreated UTCTime + about Text UniquePersonIdent ident UniquePersonLogin login diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index 315ce2c..156ad1c 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -487,7 +487,18 @@ instance AccountDB AccountPersistDB' where return $ Left $ mr $ MsgUsernameExists name Right sid -> do let defTime = UTCTime (ModifiedJulianDay 0) 0 - person = Person sid name pwd email False key now "" defTime + person = Person + { personIdent = sid + , personLogin = name + , personPassphraseHash = pwd + , personEmail = email + , personVerified = False + , personVerifiedKey = key + , personVerifiedKeyCreated = now + , personResetPassKey = "" + , personResetPassKeyCreated = defTime + , personAbout = "" + } pid <- insert person return $ Right $ Entity pid person diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index 0257586..578553f 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -132,6 +132,8 @@ changes = , renameField "ProjectCollabAnon" "repo" "project" -- 24 , renameField "ProjectCollabUser" "repo" "project" + -- 25 + , addFieldPrimRequired "Person" ("" :: Text) "about" ] migrateDB :: MonadIO m => ReaderT SqlBackend m (Either Text (Int, Int)) diff --git a/templates/person.hamlet b/templates/person.hamlet index 41f0d07..97aae99 100644 --- a/templates/person.hamlet +++ b/templates/person.hamlet @@ -1,6 +1,6 @@ $# This file is part of Vervis. $# -$# Written in 2016, 2018 by fr33domlover . +$# Written in 2016, 2018, 2019 by fr33domlover . $# $# ♡ Copying is an act of love. Please copy, reuse and share. $# @@ -14,6 +14,8 @@ $# . ^{avatarW secure $ emailText $ personEmail person} +

#{personAbout person} +