Fix bug in constructCommentControls.
[lw2-viewer.git] / src / user-context.lisp
blob389a4d3a0e1add88c81f766d7b60d698664bb036
1 (uiop:define-package #:lw2.user-context
2 (:use #:cl)
3 (:export #:*current-auth-token* #:*current-auth-status* #:*current-userid* #:*current-username* #:*current-user-slug* #:*current-ignore-hash*
4 #:logged-in-userid #:logged-in-username #:logged-in-user-slug))
6 (in-package #:lw2.user-context)
8 (defvar *current-auth-token*)
9 (defvar *current-auth-status*)
10 (defvar *current-userid*)
11 (defvar *current-username*)
12 (defvar *current-user-slug*)
13 (defvar *current-ignore-hash*)
15 (defun logged-in-userid (&optional is-userid)
16 (let ((current-userid *current-userid*))
17 (if is-userid
18 (string= current-userid is-userid)
19 current-userid)))
21 (defun logged-in-username ()
22 *current-username*)
24 (defun logged-in-user-slug ()
25 *current-user-slug*)