Forget about the problem.
the second syntax works like a charm, I had mistyped the name of the
FormFu field param ('new_password').
Thanks
J.
 |
Jorge González Villalonga
Director Técnico
DAIKON Integración y
Desarrollo S.L.
Telf: (+34) 91 188 08 28
Fax: (+34) 91 632 65 42
www.daikon.es |
El 30/05/11 16:31, Jorge Gonzalez escribió:
Hi mates,
I have an authenticated Cat app with salted SHA1 passwords. Just
followed the steps in the tutorial to get it going. Inserting a new
user in the BD works fine, and after that, I can use the user in the
app, it correctly authenticates, etc.
Now I'm trying to allow him/her to change the password, I get the old
and new password with a FormFu form, and after checking (with
$c->authenticate) that the old password is the right one, I try to
update the web user model, changing the password to the new one:
if (not
$c->model('LocalDB::UsuarioFront')->find($c->user->id)->password($form->param_value('new_password')))
{
$c->flash(error => 'Password NOT changed!');
}
When I try to do it, the app then dies with a cryptic message:
Caught exception in MyApp::Controller::MyController->password "hash not specified at /home/jorgegv/perl5/lib/perl5/DBIx/Class/PassphraseColumn.pm line 44"
I assumed that PassphraseColumn registered columns are automatically
deflated and inflated from the DB, but I don't seem to get the way to
do it.
I have also tried "update" syntax:
if (not
$c->model('LocalDB::UsuarioFront')->find($c->user->id)->update({password
=>
$form->param_value('new_password')}))
{
$c->flash(error => 'Password NOT changed!');
}
With the same results.
I have also skimmed over PassphraseColumn.pm, but I didn't reach any
conclussion...
Any ideas?
Regards
Jorge
--
 |
Jorge González Villalonga
Director Técnico
DAIKON Integración y
Desarrollo S.L.
Telf: (+34) 91 188 08 28
Fax: (+34) 91 632 65 42
www.daikon.es
|
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
|
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/