Dancer2-Plugin-Auth-Extensible-Provider-Database
view release on metacpan or search on metacpan
get_user_details $username
get_user_roles $username
set_user_details
set_user_password
COOKBOOK
Handle locked or disabled user accounts
(contributed by PerlDuck, Borodin and simbabque via Stack Overflow
<https://stackoverflow.com/questions/46746864>)
It's a good practice to not delete certain data, like user accounts.
But what do you do when you want to get rid of a user? Maybe an
employee left or was temporary suspended, or a user did not pay their
subscription fee. In those cases you would want the user data to stay
around, but they should not be able to log in any more.
lib/Dancer2/Plugin/Auth/Extensible/Provider/Database.pm view on Meta::CPAN
sub set_user_password {
my ( $self, $username, $password ) = @_;
my $encrypted = $self->encrypt_password($password);
my %update = ( $self->users_password_column => $encrypted );
$self->set_user_details( $username, %update );
};
=head1 COOKBOOK
=head2 Handle locked or disabled user accounts
I<(contributed by PerlDuck, Borodin and simbabque
L<via Stack Overflow|https://stackoverflow.com/questions/46746864>)>
It's a good practice to not delete certain data, like user accounts. But what
do you do when you want to get rid of a user? Maybe an employee left or was
temporary suspended, or a user did not pay their subscription fee. In those cases you
would want the user data to stay around, but they should not be able to log in
any more.
( run in 1.084 second using v1.01-cache-2.11-cpan-49f99fa48dc )