| MKDoc-Auth documentation | Contained in the MKDoc-Auth distribution. |
MKDoc::Auth::Plugin::Remove - Let users remove their own accounts.
This module lets users delete themselves.
Helps deciding what the URI of this plugin should be.
By default, returns 'edit.html'.
Can be overriden by setting the MKD__AUTH_DELETE_URI_HINT environment variable or by subclassing.
Deletes the user and redirects to $self->return_uri().
| MKDoc-Auth documentation | Contained in the MKDoc-Auth distribution. |
package MKDoc::Auth::Plugin::Remove; use MKDoc::Auth::User; use strict; use warnings; use base qw /MKDoc::Auth::Plugin::Edit/;
sub uri_hint { return $ENV{MKD__AUTH_DELETE_URI_HINT} || 'remove.html'; }
sub http_post { my $self = shift; my $req = $self->request(); my $obj = $self->object(); $obj->delete(); print $req->redirect ($self->return_uri()); return 'TERMINATE'; } 1;