koze85
Member
Hello to all
I made a custom registration form so far so good
I also made a custom layout for that form and it works perfectly
The problem is that I dont want to use the password element because it messes up with my nice layout because it involves 2 text inputs as a div where I want one element per div
I tried to use a simple field element but it doesnt crypt the password value... even though in Joomla users table the password is saved like that 2790c8515b0d73760010aa5fbd3c948f for password as test3 .
Now as far as I can understand the J_user fabrik plugin expects a crypted string as a password from the password element which doesnt happen
What I tried to do is to use a php function to update the password field on before submit process to change the password value to an encrypted one like this
$orig_pw = $formModel->getElementData('registration___FUpassword);
jimport('joomla.user.helper');
$salt = JUserHelper::genRandomPassword(32);
$crypt = JUserHelper::getCryptedPassword($orig_pw, $salt);
$cryptedpassword = $crypt . ':' . $salt;
$formModel->updateFormData($orig_pw, $cryptedpassword);
so it can be stored to the database and fabrik table as an encrypted on but that doenst work... it is saved as a blank value
if anyone can help I would really appreciate this cause I am stuck on this for days...
I made a custom registration form so far so good
I also made a custom layout for that form and it works perfectly
The problem is that I dont want to use the password element because it messes up with my nice layout because it involves 2 text inputs as a div where I want one element per div
I tried to use a simple field element but it doesnt crypt the password value... even though in Joomla users table the password is saved like that 2790c8515b0d73760010aa5fbd3c948f for password as test3 .
Now as far as I can understand the J_user fabrik plugin expects a crypted string as a password from the password element which doesnt happen
What I tried to do is to use a php function to update the password field on before submit process to change the password value to an encrypted one like this
$orig_pw = $formModel->getElementData('registration___FUpassword);
jimport('joomla.user.helper');
$salt = JUserHelper::genRandomPassword(32);
$crypt = JUserHelper::getCryptedPassword($orig_pw, $salt);
$cryptedpassword = $crypt . ':' . $salt;
$formModel->updateFormData($orig_pw, $cryptedpassword);
so it can be stored to the database and fabrik table as an encrypted on but that doenst work... it is saved as a blank value
if anyone can help I would really appreciate this cause I am stuck on this for days...