From 3b434035dab62daf61b3bfbaae35500f870147c9 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 30 Oct 2015 09:14:29 +0530 Subject: [PATCH] [fix] guest in comments --- frappe/templates/includes/comments/comments.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/templates/includes/comments/comments.html b/frappe/templates/includes/comments/comments.html index de94c4a867..305b7d1fb5 100644 --- a/frappe/templates/includes/comments/comments.html +++ b/frappe/templates/includes/comments/comments.html @@ -69,9 +69,11 @@ if(frappe.is_user_logged_in()) { full_name = getCookie("full_name"); user_id = getCookie("user_id"); + if(user_id != "Guest") { + $("[name='comment_by']").val(user_id); + $("[name='comment_by_fullname']").val(full_name); + } } - $("[name='comment_by']").val(user_id); - $("[name='comment_by_fullname']").val(full_name); $("#comment-form textarea").val(""); }) $("#submit-comment").click(function() {