Password element as field for custom registration

Status
Not open for further replies.

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...
 
forgot to say joomla 3.2 fabrik 3.1 rc2

and also that I get a joomla error : The password is too big please choose a password with 55 or less characters

However the user is getting registered and logged in but with an empty password, then when I go and edit the password everything is fine o_O
 
Ok... I dont believe I found out the solution It worked for me.. so I post it here anyone elese has the same problem... The only thing you have to do is to go the plugin manager open the joomla user plugin and resave it without changing anything (strong password enabled) and it worked dont know why but I dont care it worked !
 
Status
Not open for further replies.

Members online

No members online now.
Back
Top