« blib/lib/OpusVL/AppKit/FormFu/Constraint/AppKitUsername.pm
↑ Summary
blib/lib/OpusVL/AppKit/RolesFor/Model/LDAPAuth.pm »
| 1 | package OpusVL::AppKit::Controller::AppKit::User; | ||
| 2 | |||
| 3 | use Moose; | ||
| 4 | use namespace::autoclean; | ||
| 5 | |||
| 6 | BEGIN { extends 'Catalyst::Controller::HTML::FormFu'; }; | ||
| 7 | with 'OpusVL::AppKit::RolesFor::Controller::GUI'; | ||
| 8 | |||
| 9 | __PACKAGE__->config | ||
| 10 | ( | ||
| 11 | appkit_myclass => 'OpusVL::AppKit', | ||
| 12 | ); | ||
| 13 | |||
| 14 | |||
| 15 | sub change_password | ||
| 16 | : Path('changepword') | ||
| 17 | : Args(0) | ||
| 18 | : AppKitForm("appkit/user/change_password.yml") | ||
| 19 | : AppKitFeature('Password Change') | ||
| 20 | { | ||
| 21 | my ($self, $c ) = @_; | ||
| 22 | |||
| 23 | if ( $c->stash->{form}->submitted_and_valid ) | ||
| 24 | { | ||
| 25 | my $password = $c->req->params->{'password'}; | ||
| 26 | |||
| 27 | $c->user->update( { password => $password } ); | ||
| 28 | $c->stash->{hide_form} = 1; | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | __END__ | ||
| 33 | |||
| 34 | =pod | ||
| 35 | |||
| 36 | =encoding UTF-8 | ||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | OpusVL::AppKit::Controller::AppKit::User | ||
| 41 | |||
| 42 | =head1 VERSION | ||
| 43 | |||
| 44 | version 2.22 | ||
| 45 | |||
| 46 | =head2 change_password | ||
| 47 | |||
| 48 | =head1 AUTHOR | ||
| 49 | |||
| 50 | OpusVL - www.opusvl.com | ||
| 51 | |||
| 52 | =head1 COPYRIGHT AND LICENSE | ||
| 53 | |||
| 54 | This software is copyright (c) 2010 by OpusVL - www.opusvl.com. | ||
| 55 | |||
| 56 | This is free software; you can redistribute it and/or modify it under | ||
| 57 | the same terms as the Perl 5 programming language system itself. | ||
| 58 | |||
| 59 | =cut |