1 package Reaction::InterfaceModel::Action::User::ResetPassword;
7 'Reaction::InterfaceModel::Action::User::Role::ConfirmationCodeSupport';
8 use aliased 'Reaction::InterfaceModel::Action::User::SetPassword';
10 class ResetPassword is SetPassword, which {
12 does ConfirmationCodeSupport;
14 has confirmation_code =>
15 (isa => 'NonEmptySimpleStr', is => 'rw', lazy_fail => 1);
17 around error_for_attribute => sub {
19 my ($self, $attr) = @_;
20 if ($attr->name eq 'confirmation_code') {
21 return "Confirmation code incorrect"
22 unless $self->verify_confirmation_code;
24 #return $super->(@_); #commented out because the original didn't super()
27 implements verify_confirmation_code => as {
29 return $self->has_confirmation_code
30 && ($self->confirmation_code eq $self->generate_confirmation_code);
39 Reaction::InterfaceModel::Action::User::ResetPassword
43 =head2 error_for_attribute
45 =head2 confirmation_code
47 =head2 verify_confirmation_code
51 L<Reaction::InterfaceModel::Action::DBIC::User::ResetPassword>
53 L<Reaction::InterfaceModel::Action::User::Role::ConfirmationCodeSupport>
57 See L<Reaction::Class> for authors.
61 See L<Reaction::Class> for the license.