An admin may need to create profile nodes that aren't assigned to any current user in the system. Setting the node author to blank (anonymous) seems like a reasonable way to do so. However the module prevents you from having more than one profile node per author even when that author is anonymous. It seems reasonable to let there be multiple profile nodes by an anonymous author.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno’s picture

As user profiles are associated with a user, what is the purpose of having a profile node not associated with a user? If a profile is not associated with a user, then it's not a user profile.
Drupal doesn't have the concept of group; if such concept would exist, then it would be useful to have group profiles too.

Jody Lynn’s picture

The idea is this:
I have a complex content type called 'Person' which contains many fields. The users in the system use this as a content profile. But there are also individuals who are not users in the system which we also need the same information about (a CRM type site). Making a second content type with the same fields feels very redundant.

(BTW I have been mulling over trying to add the concept of user groups to Drupal as well)

apaderno’s picture

If the individuals are not users of the Drupal site you are talking of, then it's not possible to create a profile for those users; that is not a problem of this module, but it's also a problem present with Drupal user module, which doesn't allow to create a user profile without to create a user account.
You can create a user account to which you assign the content profile you want; in this way there would be a user account, and you could add a content profile to. The user account would not be really used from a real person.

Jody Lynn’s picture

I guess I don't really understand what the harm is in having multiple anonymous profile nodes. Ultimately they're just nodes.
I'm not saying there's a problem with this module currently- it's a minor feature request. It's a 3 line patch so people don't have to create dummy user accounts for no reason just to create a node.

apaderno’s picture

The problem of having multiple anonymous profiles is that such concept doesn't exist in Drupal. If I would not have this module installed, and I would want to have a user profile for a user that doesn't have a user account, I could not because Drupal doesn't allow to create a user profile without to have a user account.

This module extends how the profiles are created in Drupal; it doesn't alter it. If the problem is to show data about individuals who don't have a user account on the site, then you can create a content type to describe such individuals.
What you suggest to do is not the Drupal way, and it's something other users of this module could not need.

Shai’s picture

I believe there is a huge need for a kind of CRM-light within Drupal (more lightweight alternatives to Salesforce and CiviCRM) and I'm sure many developers are doing this on their own via CCK like Jody is.

If the community around this module isn't interested in extending it in ways that would a support a CRM-lite use-case, like Jody's, maybe Jody's best alternative is to have a content-type with a user-reference field that isn't required. Course, you do lose all that integration with the user module that content_profile delivers.

I don't see what the big deal would be to add a configuration check-box, turned "off" by default, that would say, "allow x role to create multiple content_profiles".

I think what Jody is requesting is perfectly the "Drupal way." What isn't good practice is creating Drupal users with phony emails or other work-arounds.

Best,

Shai

Jody Lynn’s picture

This module is in a weird place in that, obviously, it's both a user profile and a node. So Kiam's arguing that no, you can't do that because it's inconsistent with profiles, but what I'm arguing is that it's perfectly consistent with nodes. Of course with nodes you can have as many nodes of a given content type assigned as authored by anonymous. There's nothing 'not the Drupal way' about that concept. If anything, trying to make nodes be profiles to begin with is 'not the Drupal way' but that's just where we are with this in D6 right now. Whether we are more attached to the 'content' or the 'profile' concept in 'content profile' is just a preference.

I don't believe my patch would have negative side effects on other usages, but I'm happy to maintain it myself for my use if others don't feel comfortable with it.

apaderno’s picture

with nodes you can have as many nodes of a given content type assigned as authored by anonymous

It is also true that nodes are not normally set as authored by the anonymous user.
You can do it, as you could add the suggested code to this module. Drupal doesn't set the user who authored a node to the anonymous user as default; similarly, the proposed code should not be executed by default.

My point is that the proposed code covers a need that most people seem to not have. I understand that to create a fake user just to add information about individuals is not normally done; still, that can be an alternative, if to create a content type to save the information about people is not thought to be the correct way, or if using Storm is not desired (Storm allows to add information about individuals, companies, and also information about tasks, and projects they are maintaining).

sdrycroft’s picture

I installed this module as I thought I would be able to do exactly what Jody is proposing. We have a number of sites, each of which have a number of users who are all experts in a specific field. We'd like to be able to create biography pages for these users detailing their area of expertise, and also some additional information about them. What we'd also like to be able to do, is to create identical biography pages for people who aren't users of the system.

I'm with Jody and Shai on this one, all that is needed is an additional option which allows a user to create more than one Profile node. If this option is selected, then a different method of associating a user's own Profile node with their profile page would be required (rather than selecting the only Profile node created by them). This would be very easy to do, and would be fully in keeping with the Drupal way of programming.

I'd be interested to hear the fago's opinions on this one.

Jody Lynn’s picture

sdrycroft, this is my full patch. it sets the default value of the node author to anonymous if you're at node/add, and allows multiple anonymously-authored content profile nodes. It's working for us.

sdrycroft’s picture

Thanks for the patch Jody. The problem I have with this is that if a user of a site authors a biography for someone else, they will want to be recognised (and get credit) for this work. This wouldn't be possible if the node were marked as being authored anonymously. I fear I may have to write my own module for our needs (which really aren't very specific).

fago’s picture

Status: Needs review » Needs work

hm, it looks like adding multiple profiles for anonyous user doesn't work anymore. The patch needs to allow that just for anonymous users, then we can automatically default to creating anonymous profiles as soon as the admin has already a own profile.

fago’s picture

Status: Needs work » Fixed

ok, I just fixed multiple profile for anonymous users - that is working again now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jibort’s picture

I have a similar need as sdrycroft. I'm developing a directory of companies. Some of the companies are associated with users (one employee of the company) who will create and/or maintain the data, while other companies are not yet associated with any user. Then, a content manager is the responsible of creating and maintenance of such companies.

For me, nodes without author is not a good solution (each content manager needs to control his companies). Instead, it would be a great solution to allow certain roles (content managers) to create multiple nodes of a certain profile node type (companies). Do you solved the problem? Thanks?

Jordi

stevep’s picture

reposted comment "Publishers and authors: A better way?" in the form of a question at http://drupal.org/node/1085108