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 automaticallydeflated 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*
-------------- next part --------------
Skipped content of type multipart/related