I have user accounts that are shared by multiple users. The problems is that comment module will treat them as one user. Therefore the author name of their comments will be the username of the account. and they won't be able to change it to their own name. I want the comment module to treat them as anonymous users and let them choose the name they want.

I've had a look on comment module the function comment_form is responsible for this action, but it is too complicated and I don't want to mess with it and end up with a security problem.

Any ideas?

Comments

dman’s picture

nadiana’s picture

Well, I have to.
The site I'm working on have private pages related to courses. They should be only viewed by users how took the same course.
We don't want to deal with hundreds of temporary user accounts. And even if we allow registering we won't be able to verify if they actually took the course or not.
The bottom line is that we need to make shared user accounts to save us time and resources.

I have created a role for shared user accounts. and created a user account per course.
I have used tac_lite module to restrict access based on taxonomy.
I have also used userprotect to prevent users from changing their password.

It's working perfectly. I just want to allow users under this role to write their name.

dman’s picture

Yeah, I imagined there would be some mad possible reason why you'd want to do this, but obviously it goes against the grain of user accounts and verified content authors.
Groups is intended to solve this for you.

As far as the system is concerned, you'll have to stick with the author being the account holder.
Try adding an extra textfield to the node definition, then rendering that where it used to show user name.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/