aboutsummaryrefslogtreecommitdiffhomepage
path: root/model.lisp
diff options
context:
space:
mode:
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))