I am very glad to find this module here. I am glad to find that I'm not the only one with this need. I do like the requirement that the content profile CCK type has an e-mail address as a field. However, I'd like to suggest an alternate way of achieving the same thing, let me know what you think about this:
Insert code into hook_nodeapi() in the presave operation for node type of the content_profile node type. When a new node type of content profile is created, first, a check is made to see if the user already has a content profile node for themselves. If so, a new user is created, and if an e-mail address can be found in the content profile node, it is used as the e-mail address for that user. If not, a bogus, distinct e-mail address change_me_now_123@example.com is utilized. Configuration options could be added to be used to specify the UserName for the user, which e-mail address field to use, and which content profile node types are eligible to work this way.
I'm going to work on implementing this in the module as another option.
Comments
Comment #1
ianwremmel commentedHi Darrell, with the current dev version of Content Profile Create User, I think the only modifications that would be needed would be to expose content_profile_create_user_op in such a way that rules can use it. Then rather than hook_nodeapi and what sounds like potentially extensive admin pages, the majority of the site-specific customization could be handled via Rules.
I can see where configuration at the content type level instead of the global level may seem useful and I'd certainly look at any patches you want to send, but I'm not sure it's something that really brings much benefit; since very likely only a small set of users will have the permission to create users from profiles, I'm not sure possibly complex code and ui additions (complex meaning that configuration would have to be done on every content profile content type) really seems like a good idea. I'd be happy to debate it further.
Finally, I'm very much against the use of fake email addresses. If you really need someone to be a user that badly, then, in my opinion, they should have a useable email address. Without a working email address, it seems to me an account should be marked as blocked, in which case, why have an account at all? The only way they could get their password would be to communicate it directly with a site administrator or meet someone with permission to change passwords and borrow that person's keyboard to change it. Both of those cases seem, at least to me, to be both inconvenient and insecure.