From 7a3b904c26e2a08a88f58684d03aff3fb2a39c86 Mon Sep 17 00:00:00 2001 From: colin Date: Sun, 1 Jan 2023 08:48:50 -0800 Subject: Add: password reset feature --- model.lisp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'model.lisp') 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)) -- cgit v1.2.3