|
|
|
@ -57,9 +57,11 @@ func greetUser(w http.ResponseWriter, r *http.Request) {
@@ -57,9 +57,11 @@ func greetUser(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
defer log.PanicSafe() |
|
|
|
|
log.LogInfo(fmt.Sprintf("%s called greetUser", getSessionIdentifier(r))) |
|
|
|
|
loggedIn, username := detectUser(r, "greetUser") |
|
|
|
|
fmt.Fprintf(w, pageBuilder(r, "home")) |
|
|
|
|
|
|
|
|
|
if loggedIn { |
|
|
|
|
fmt.Fprintf(w, strings.Replace(bodyWrapper(r, "loggedIn"), "$USER", username, -1)) |
|
|
|
|
} else { |
|
|
|
|
fmt.Fprintf(w, pageBuilder(r, "home")) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|