Retry after REJECT: edit bad input instead of aborting
This commit is contained in:
parent
e00fc00664
commit
d8dfc2cde2
3 changed files with 41 additions and 7 deletions
|
@ -8,7 +8,7 @@ sub command :Tab(adduser) {
|
|||
$command eq 'adduser' or return NEXT;
|
||||
|
||||
if ($cart->size) {
|
||||
return REJECT, "Create the account *before* scanning things.";
|
||||
return ABORT, "Create the account *before* scanning things.";
|
||||
}
|
||||
|
||||
return "Name for the new account", \&username;
|
||||
|
|
|
@ -29,6 +29,11 @@ sub hook_reject {
|
|||
_log("REJECT [$plugin] $reason");
|
||||
}
|
||||
|
||||
sub hook_retry {
|
||||
my ($class, $plugin, $reason, $abort) = @_;
|
||||
_log("RETRY [$plugin] $reason");
|
||||
}
|
||||
|
||||
sub hook_user_created {
|
||||
my ($class, $username) = @_;
|
||||
_log("NEWUSER $username");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue