summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/site.clj13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/site.clj b/src/site.clj
index d387247..5868f94 100755
--- a/src/site.clj
+++ b/src/site.clj
@@ -194,17 +194,12 @@
;; Templates
-(defn set-user-attributes [st session]
- (if (session :nick)
- (.setAttribute st "user_nick" (session :nick))
- (.setAttribute st "isadmin" (session :is_admin))))
-
(defn fetch-template [template-name session]
(let [st (.getInstanceOf template-group template-name)]
- (and st
- (do
- (set-user-attributes st session)
- st))))
+ (if (and st (session :nick))
+ (do (.setAttribute st "user_nick" (session :nick))
+ (.setAttribute st "isadmin" (session :is_admin))))
+ st))
;; Landing