Exemplo n.º 1
0
func wikiLogout(w http.ResponseWriter, r *http.Request) {
	tools.ClearCookie(w, "user_id")
	// clear the current user
	currentUser = nil
	// redirect to the wiki front page
	http.Redirect(w, r, "/wiki", http.StatusFound)
	return
}
Exemplo n.º 2
0
func unit4Logout(w http.ResponseWriter, r *http.Request) {
	tools.ClearCookie(w, "user_id")
	// redirect to the signup
	http.Redirect(w, r, "/unit4/signup", http.StatusFound)
	return
}