summaryrefslogtreecommitdiff
path: root/lisp/service/users-service.lisp
diff options
context:
space:
mode:
authorckonstanski <kostcarl@isu.edu>2026-08-13 17:33:16 -0600
committerckonstanski <kostcarl@isu.edu>2026-08-13 17:33:16 -0600
commit7400eef8f282dd71e940dd40a00de3f625c2d749 (patch)
tree759a3e4b34e45f9bfa48204de2271cbbe7590044 /lisp/service/users-service.lisp
parentb242e46d95c59e7c06caa8a9a757eda5400b1e32 (diff)
registration fixes
Diffstat (limited to 'lisp/service/users-service.lisp')
-rw-r--r--lisp/service/users-service.lisp49
1 files changed, 24 insertions, 25 deletions
diff --git a/lisp/service/users-service.lisp b/lisp/service/users-service.lisp
index 965fee6..78cf065 100644
--- a/lisp/service/users-service.lisp
+++ b/lisp/service/users-service.lisp
@@ -76,7 +76,7 @@
(setf registration (get-registration-by-id auth-pkg id)))
(handler-case
(let ((text-message (format nil
- "Hello ~a ~a and welcome to the ~a website!~%~%A user account registration has been created for you. It expires in 3 days.~%~%Please click the following link to complete the registration:~%~%~a://~a/register/~a~%"
+ "Hello ~a ~a and welcome to the ~a website!~%~%A user account registration has been created for you. It expires in 3 days.~%~%Please click the following link to complete the registration:~%~%~a://~a/register?hash=~a~%"
(name *webapp*)
(first_name registration)
(last_name registration)
@@ -170,30 +170,29 @@
registration)
(registrations-gc auth-pkg)
(setf registration (get-registration-by-hash auth-pkg hash))
- (org-ckons-json::objects-to-json
- `(,(if registration
- (if (string= pwd pwd2)
- (let ((user (make-instance 'user
- :username username
- :pwd pwd
- :first_name (first_name registration)
- :last_name (last_name registration)
- :email (email registration)
- :phone phone
- :active t)))
- (if (insert-user auth-pkg user)
- (progn
- (loop for role-group in (union '("profile-admin")
- (cl-ppcre:split "\\|" (role_groups registration))
- :test 'string=)
- do (insert-user-role-group auth-pkg (make-instance 'user-role
- :user_id (id user)
- :role_group_name role-group)))
- (delete-registration auth-pkg hash)
- (setf (session-value :message) "Registration completed successfully."))
- (setf (session-value :errormsg) "Error while completing registration.")))
- (setf (session-value :errormsg) "Error: passwords do not match."))
- (setf (session-value :errormsg) "Error while completing registration."))))))))
+ (if registration
+ (if (string= pwd pwd2)
+ (let ((user (make-instance 'user
+ :username username
+ :pwd pwd
+ :first_name (first_name registration)
+ :last_name (last_name registration)
+ :email (email registration)
+ :phone phone
+ :active t)))
+ (if (insert-user auth-pkg user)
+ (progn
+ (loop for role-group in (union '("profile-admin")
+ (cl-ppcre:split "\\|" (role_groups registration))
+ :test 'string=)
+ do (insert-user-role-group auth-pkg (make-instance 'user-role
+ :user_id (id user)
+ :role_group_name role-group)))
+ (delete-registration auth-pkg hash)
+ (setf (session-value :message) "Registration completed successfully."))
+ (setf (session-value :errormsg) "Error while completing registration.")))
+ (setf (session-value :errormsg) "Error: passwords do not match."))
+ (setf (session-value :errormsg) "Error while completing registration."))))))
(defclass users/modify-service (users/add-service)
()