This object is in archive! 

Is there an option to let anonymous users comment on responses?

Archived Michael Q. 12 years ago

I am using this in an intranet environment and would like my fellow employees to comment on posts with out having to identify themselves. Do you have some code changes you can share with me to make this happen?

Best Answer
photo

The easiest way is to change the code, but no guarantee that it will work as you expect it:

  1. In application/modules/system/models/Response.php there is canCommented method that you need to remove in order to all unregistered users to leave comments;
  2. public/assets/modules/resources/js/comments.js on lines 122-126 there is a check if user is guest or not when you click on Post Comment button;
  3. in application/modules/resources/controllers/CommentController.php there is action addAction if guest to redefine comment to anonymous user with id=2 with runtime of Singular_Runtime::store('loggedUser', $anonUser)

Replies (1)

photo
2

The easiest way is to change the code, but no guarantee that it will work as you expect it:

  1. In application/modules/system/models/Response.php there is canCommented method that you need to remove in order to all unregistered users to leave comments;
  2. public/assets/modules/resources/js/comments.js on lines 122-126 there is a check if user is guest or not when you click on Post Comment button;
  3. in application/modules/resources/controllers/CommentController.php there is action addAction if guest to redefine comment to anonymous user with id=2 with runtime of Singular_Runtime::store('loggedUser', $anonUser)

Replies have been locked on this page!