[html-formfu] How do you handle "change password" forms?

Moritz Onken onken at houseofdesign.de
Tue Mar 31 09:32:18 BST 2009


A non-text attachment was scrubbed...
Name: dbic.diff
Type: application/octet-stream
Size: 2479 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20090331/538285a3/dbic.obj
-------------- next part --------------


Have fun :-)

Am 31.03.2009 um 10:00 schrieb Carl Franks:

> 2009/3/30 Moritz Onken <onken at houseofdesign.de>:
>> Hi,
>>
>> I have a pretty large form where you can change the password using  
>> two
>> password fields which have to match if you want to change the  
>> password.
>>
>> Problem right now is, that these password fields get sent with an  
>> empty
>> value and Model::DBIC inserts those empty strings in the database,  
>> thus
>> changing the password. My workaround right now is to remove those two
>> password fields if they are empty. This is done before  
>> submitted_and_valid
>> and works great so far.
>>
>>  I was just wondering if there is a better way to do this. Or if it  
>> is
>> reasonable to add this functionality to the model_config where  
>> Model::DBIC
>> can pick it up and skip the password fields if they are empty.
>
> Hmm, I'm confused.
> I just did a grep for "ignore_if_empty" and found no matches - but I
> would have sworn I added this in the last few weeks.
> Maybe I just dreamed it.
> If anyone wants to send a patch to add this to model_config() - (with
> tests) - please do.
>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu



More information about the HTML-FormFu mailing list