There have been many posts around the web on how to get custom registration forms setup, sometimes targeting specific roles. This forms allows the site administration to create paths where a chosen content_profile node type will be used in conjunction with the normal user registration form to customize it for that specific role. It also handles assigning the proper role to that new user once the form is submitted.

Use cases for this would be if you want a specific location for your partners, vendors, or other unique types of users to register accounts. Right now it is pretty straight forward module addon, but if there are more broad needs / uses that this module could fill then I would not mind consider creating and maintaining it apart from content_profile.

All help with checking to make sure it meets d.O specifications/standards for a new module would be much appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NikLP’s picture

subscribing

heddiw’s picture

jocken’s picture

It didn't do anything actually. No field for password or username. Or am I using it wrong?

cmcintosh’s picture

This is not the same as autoassignroles, it does assign role based on what content profile form you fill out, but that i think is something a bit different.

To use the module you will need to have multiple content profile node types and ideally two or more types of roles you wish to allow people to signup into. Once you have this, setup your path for the registration form. When a new user goes to that path, then they will be displayed with the normal registration form in addition it will also display that content profile node that you have chosen. I was unable to accomplish this with the other existing modules, which is why i have written this one.

heddiw’s picture

i see, i have a similar setup for user registration with multiple profiles and roles and i use autoassignrole + #689796: content_profile_useredit to achieve this. it's a pity, i've found your module a bit late :D

thanks anyway

density’s picture

I have installed this and i get the option on Content Profiles to 'Use this content type as a content profile for users'.
Then under my User Management menu, there is 'Custom User Registration forms'. This screen allows me to set a path and select the Content Profile to use for each role sign up.

I have created a path in the URL aliases for my Content Profile creation node, and i'm using this as the path for my custom registration form.

When i go to this url as an anonymous user, the content profile comes up, but with no core User Registration fields. Password/username/email. (related to the error below?)

I also get this error on my standard drupal 'Create new account page':
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in /home/sites/domain.co.uk/public_html/includes/form.inc on line 372.

I have been through the permissions thoroughly many times just incase and dont think this looks like a permissions thing anyway.

Any help would be hugely appreciated.
Thanks

cmcintosh’s picture

@density I will take a look at it today and see what maybe going on and try to submit a patch. I apologize for your troubles there.

cmcintosh’s picture

FileSize
2.72 KB

The use case I have is that I want to be able to sign up different types of users to, what I call holder roles. This i accomplish using the forms and Rules, when an anonymous user signs up they are placed into one of these limited roles until approval, but there are probable many case studies for this module.

I have a demo site setup at: http://workflow.mcintoshdesings.com/ that shows the module working, the setup i have on the site are as follows:
CCK, Content Profile, Custom Registration Forms, Rules and a few other non related modules. This is sort of my test bed, so I will keep this up and let people play with it. The site is running Drupal 6.17, as well as the latest stable release of Content Profile.

I have two simple forms first, regular registration form is: http://workflow.mcintoshdesings.com/user/register,
simple profile is: http://workflow.mcintoshdesings.com/user/register/social
pro profile is: http://workflow.mcintoshdesings.com/user/register/pro

I did find and fix the above bug.

cmcintosh’s picture

It was many posts I saw looking for this that got me to write the module, I would like to clean it up a bit more, but not sure what direction to take it. Any ideas in making it more friendly would be appreciated.

fayola’s picture

I get a blank page on the custom registration pages....Big Bug!!!!

fayola’s picture

Fixed the blank page issue because it called a function from content_profile_registration.module so I made that the dependency instead of content profile, but having both modules seems like overkill. As I was having issues with content_profile_registration.module and decided to use this.

cmcintosh’s picture

fayola: Thanks for the feedback. There is a function in the content_profile_registration module that I am using, but we could copy, paste into this module to remove that dependency. Ill upload the change. Your right about it being overkill to have both enabled.

buzzman’s picture

Status: Needs review » Active

hello:

any update on copying the "content_profile_registration_add_profile_form" func from content_profile_registration module to this module?

i checked the code and that func in-turn calls a content_profile module func "content_profile_get_settings", which calls another content_profile module func "content_profile_settings_info".

so my guess is that those funcs or equivalent code also needs to be made available in this module to be fully independent. that wud be really nice if we can do w/o the content_profile* modules. i'm waiting just for this to go into the module so i can use it rightaway :-)

btw, i have a case where i've deployed fields for the reg_form using the profile module. is there a way that i can have all of those fields either show-up or not depending on the url of the register pages like so:

http://site.com/user/register
http://site.com/user/register/biz

for the 2nd biz url above, i show all the profile fields. for the 1st normal url, what wud I need to do to NOT show all or some of the profile fields?

what wud the conditional be like? can u plz provide a code snip? cuz as far as i saw the code for user_register func in the user module, the whole user-edit form gets array-merged and displayed on the reg_form :-(

next i'm also worried on how to make sure that for the non-biz url, when the form does not display the profile fields, there won't be any form submit issues since all the profile-fields are required?

any help or pointer or code tips is greatly appreciated.

thanx for the fab module.

cmcintosh’s picture

Ask and you shall receive. The only thing I have left in as a requirement is the Core Content Profile module as I see this module as a sub-module for that project.

Additionally to your question about different fields for different logins, this is where the flexibility of CCK + Content Profile comes in to play. This way you can create two similar node types that can both be Content profiles. Select one to be added to one of the two paths. the other for the other path. Once you do this it is simple to setup rules to assign a user to a role based on which form the initially filled out, then use something like ACL or Content Access to prevent them from later creating the other type of Content profile node.

cmcintosh’s picture

FileSize
3.53 KB

Attached is the new version for the module. I apologize for taking a bit to update as I have a swamp load of projects right now. Trying to keep the light on.

joecanti’s picture

Hi,

Great project! Im nearly there on configuring, but the roles are not being selected at the moment upon register. I think the forms arent being inserted properly into the various different paths - whats the right way to do this?

Also, I noticed a bug now which i think is to do with this module, but cant be sure - firstly the admin menu module lost all its links which was strange, and then the admin sections was only showing the rules options - everything else was removed.

I tried uninstalling the module/clearing caches etc but no change. I'm going to try manually removing it from the database to see if it is the cause of the problem.

Are you planning to make a d.o place for this to live? I think it fills a gap that no other module does.

Many thanks, joe

guntherdevisch’s picture

Looks promising -> subscribing!

g.k’s picture

subscribing

cmcintosh’s picture

You asked, I acted. You can now find this module on its own project page here: http://drupal.org/project/custom_registration I am just getting things with it started and stumbling through getting CVS access working in Eclipse. I do have a new download attached as an issue on the module.

Thanks again for everyone's kind comments, suggestions, and encouragement.

McIntosh Designs, http://chrismcintoshdesigns.com is always looking for ways to help drupal and the internet as a whole.

tr33m4n’s picture

Hello there,

When viewing the registration form as an anonymous user I get the following error:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in /var/www/funnywonders-rebuild/includes/form.inc on line 376

Any ideas?

Cheers

Jumoke’s picture

subscribing