How to ... Register a new User

The site I'm working on has existing Joomla users. The new Fabrik project will management a certification process which begins with a person's registration for a course. The course registrant may already exist on the site or not. I've set up a registration list / form with the JUser plugin. This allows me to create a new Joomla user. I can separately register the user for a course.

What I want to do is simplify the process for the course administrator by having one 'step'. The administrator would enter a user's email address. If that email matches an existing Joomla user they register that user for the course. If the email doesn't match, they create the new Joomla user AND register the user for the course using the information entered once. And if the course registrant is a new Joomla user, they should receive the normal Joomla new user email.

Because a valid Joomla user is needed to register the person for the course, what is the best way or ways to implement this?
 
As an added bit of information, uses do NOT self-register for courses (at present). The register though a third party. The third party's course administrator then registers that user with this site and the new certification process management application built with Fabrik.
 
One solution that comes close is: I added an email database join element to my course registration, and used the user registration list's table as the data source. Then set the 'Add option in front end' options to:
Popup form - my user Registration form
Add option in front end - yes
Pop-up window width - 400px
Link to joined record - yes
Front end Select - yes

So far this allows the course administrator to select an existing email address, but from the list of course registrants (not the site users). If they don't find the email match there, the "+" button goes to the User Registration form allowing them to add the new Joomla user. On saving the user registration (which creates the registration list record) now the new user's email is available in the course registration.

The only thing missing is that the course administrator cannot choose from a list of site users. They can only pick from a list of users already having previously registered for a course.
 
In Joomla, all registered users, their IDs, names and email addresses are in the table #__users, so perhaps you want to join this?
 
For now I've solved this as follows.

I created a new list (called 'Site User') using the Joomla users table (not a join, just a list using that table). In my course registration form (as noted earlier in this thread) I added a registrant email element that is a database join with the Joomla users table. I set the value and label for the join table as 'email'. The where clause restricts the records from the users table to specific groups. This is because I needed the email search to go against only a subset of existing Joomla users. If an email address match is found it means the user already exists and the course admin can complete the course registration form and be done.

If the email doesn't match an existing user the course admin needs to add the new registrant as a site user (Joomla user). So in the Registrant Email element's 'Add option in front end' I set the Site User form as the pop-up, 'Add option in front end set to 'Yes', and Link to joined record set to 'Yes'. This creates a button ('+') along with the Registrant Email element input. Since the email found no matches, the course admin clicks the '+' button and the Site User form appears in a pop-up. The course admin fills out the requisite fields and since the Site User form is using the JUser plugin, it creates the new Joomla user. I also added two PHP plugin custom code blocks that add coincident records to the comprofiler and cbsubs_subscriptions tables which are necessary in this case to properly set up the user. Initially the JUser plugin is configured to let Joomla email the user of their account creation, but I'll change that to a Fabrik email probably for better customization.

Maybe this will be helpful to someone else.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top