Refactor the comment creator/author_name to comply with the Plone core convention to store the username on the creator attribute and not the fullname.

This commit is contained in:
Timo Stollenwerk
2012-07-12 15:39:27 +02:00
parent 98dca81438
commit 0535e659ff
10 changed files with 39 additions and 30 deletions
+1 -2
View File
@@ -179,7 +179,6 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
if portal_membership.isAnonymousUser() and \
settings.anonymous_comments:
# Anonymous Users
comment.creator = author_name
comment.author_name = author_name
comment.author_email = author_email
comment.user_notification = user_notification
@@ -198,7 +197,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
fullname = unicode(fullname, 'utf-8')
if email and isinstance(email, str):
email = unicode(email, 'utf-8')
comment.creator = fullname
comment.creator = username
comment.author_username = username
comment.author_name = fullname
comment.author_email = email