Juser and name/username

rgreen

Member
Hi,
I am creating a new multi-page registration form using juser and have the following question:

Up until now and in my "pre-Fabrik" sites I have used email as username plugins with the standard joomla registration and have avoided the required "username" and "name". The plugins don't seem to work with my new juser workflow as it is failing authentication in the end. So I can probably keep username (too bad) but the required "Name" is very confusing as we are capturing First Name and Last Name. I could substitute Last Name for Name but could have problems in the future. Any other options I'm not thinking about? how about concatenate first name+last name for the "Name" element? if so, how might I do that?

also, as others have mentioned in older threads password in my Fabrik list/table is not hashed. Where do I turn encryption on for that element? I looked in element>publishing (one of the threads mentioned this) and could not find (could have been referencing older Fabrik versions).

thanks
 
I've set up several instances of juser where we automatically use the email for the 'username'. Best way to do it is to have a username field, hidden, and a PHP form submission plugin which runs onBeforeProcess, and does something like:

Code:
$formModel->updateFormData('yourtable___username', '{yourtable___email', true);

... which should just set the hidden username field to whatever the email field is.

For concat'ing the first and last names, add this line to the same plugin code ...

Code:
$formModel->updateFormData('yourtable___fullname', '{yourtable___first_name} {yourtable___last_name', true);

... or, use a calc element for it, which does ...

Code:
return '{yourtable___first_name} {yourtabe___last_name}';

-- hugh
 
thanks Hugh. I'll give those a try.

And my bad for combining multiple issues (but relating to registration). How do I turn on encryption so users passwords are not readable in the fabrik table linked to the Joomla user table?
 
The email as username worked after I inserted a second "}" after "yourtable___email"
but the concat name did not work. It did give me a "successful" message but no new user appeared in user manager or the fabrik user table. Here is my final code. I also tried it with a second "}" with the same result. thanks...

Code:
$formModel->updateFormData('enrollment___username', '{enrollment___email}', true);
$formModel->updateFormData(?enrollment___name', '{enrollment___Parent1_First_Name} {enrollment___Parent1_Last_Name', true);
 
Same missing } here, try
Code:
$formModel->updateFormData(?enrollment___name', '{enrollment___Parent1_First_Name} {enrollment___Parent1_Last_Name}', true);
{element-name} is a placeholder for the field content.
 
thanks. Still says '"successful" but does not add a new joomla user. I tried separating the two codes into separate php plugin "instances" but still no additional registrations. Any other ideas? following is the latest
Code:
$formModel->updateFormData('enrollment___username', '{enrollment___email}', true);
$formModel->updateFormData(?enrollment___name', '{enrollment___Parent1_First_Name} {enrollment___Parent1_Last_Name}', true);
 
ok. I got everything working. I ended up using the calc element for both the username and the name and removed the php plugin. Works.

Only remaining issue on this registration thread is how to turn encryption on to mask the password in the db table. Thanks...
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top