catalyst  

Re: [Catalyst] Change user password

Bogdan Lucaciu
Mon, 01 Feb 2010 08:33:49 -0800

I think you're best off using 'check_password' from Credential::Password

Take a look at it:
http://cpansearch.perl.org/src/FLORA/Catalyst-Plugin-Authentication-0.10016/lib/Catalyst/Authentication/Credential/Password.pm

Assuming the user is authenticated, you should try:

$c->get_auth_realm('default')->credential->check_password($c->user,
{password=>$pass});



On Mon, Feb 1, 2010 at 5:47 PM, Kiffin Gish <kiffin.g...@planet.nl> wrote:
> I want to give users the ability to change their password via the usual
> web form:
>
> current password: _______
> new password:     _______
> re-type:          _______
>
> How do I check that the current password is has been typed in correctly,
> and if it is, how do I put the new password into effect (as if he/she
> has re-logged in with it)?
>
> Is this something that $c->authenticate can help me with, how then?
>
> --
> Kiffin Gish <kiffin.g...@planet.nl>
> Gouda, The Netherlands
>
>
> _______________________________________________
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
Bogdan Lucaciu
Operations Manager, Sinapticode
http://www.sinapticode.com

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/