Forums

db record loader and password update

marklandry 06 Mar, 2014
Hi,
I've got a registration/profile form that's working fine, db record loader works fine, updates form, etc.

In the form I've got "password" and "verify password"
When the form is pulled up to edit, the "password" field is populated with the md5 hash.
I'd like it to be blank (like it is when you edit profile info in Joomla) and not update unless user adds something to that field.

Hope that makes sense.

Thanx for your help

Mark
GreyHead 07 Mar, 2014
Hi Mark,

The simplest solution is probably to change the name of the 'password' input so that CF doesn't try to re-publish it. Try password_new' or something like that and I think it will fix the problem.

If it has to be 'password' then try a Custom Code action in the On Load event with this code in it:
<?php
$form->data['password'] = '';
?>

Bob
marklandry 07 Mar, 2014
Thanx Bob,
Figured it out, removed the user registration action and added a jooomla user/create action...
marklandry 07 Mar, 2014
Sorry, one more thing,
I tried
$form->data['password'] = '';
and password field is still populating on load... All I need at this point is for it to be blank on load.

Thanx again
marklandry 07 Mar, 2014
my bad,
I put the custom code after the db record loader and it seems to work fine.

Only thing left is that when I try to change the password it doesn't work...
GreyHead 08 Mar, 2014
Hi Mark,

If you want to change the password you will need to add more custom PHP to calculate the salted+encrypted value. Joomla! doesn't save raw passwords. You will find the code you need in the Joomla! User component.

Bob
This topic is locked and no more replies can be posted.