summaryrefslogtreecommitdiff
path: root/model.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-01-01 08:59:53 -0800
committercolin <colin@cicadas.surf>2023-01-01 08:59:53 -0800
commit23b40732d41589380d38235e67b27bdd9269b658 (patch)
tree0373cbf6fba5f7be86ed627c61247dcf0e33165e /model.lisp
parent58b68da92537f2a48cdb00ee4dd16ea9711c8fb9 (diff)
parent753f7def0369802f00e29c085f01a391f5b20f07 (diff)
Merge branch 'featre/password-reset'
Diffstat (limited to 'model.lisp')
-rw-r--r--model.lisp7
1 files changed, 7 insertions, 0 deletions
diff --git a/model.lisp b/model.lisp
index ca78698..5a06fe2 100644
--- a/model.lisp
+++ b/model.lisp
@@ -99,6 +99,13 @@
(with-transaction ()
(make-instance 'user :name name)))
+(defun set-new-password (user pw)
+ (with-transaction ()
+ (setf (user-pwhash user)
+ (hash-string pw (user-pwsalt user)))
+ t))
+
+
(defun use-invite-with-code (code username pw)
(with-transaction ()
(when-let (invite (invite-by-code code))