Code: Select all
sub queryLoginPinCode {
my $message = $_[0] || T("You've never set a login PIN code before.\nPlease enter a new login PIN code:");
do {
my $input = $interface->query($message, isPassword => 1,);
if (!defined($input)) {
quit();
return;
} else {
if ($input !~ /^\d+$/) {
$interface->errorDialog(T("The PIN code may only contain digits."));
} elsif ((length($input) <= 3) || (length($input) >= 9)) {
$interface->errorDialog(T("The PIN code must be between 4 and 9 characters."));
} else {
return $input;
}
}
} while (1);
}
it will give us a error dialog.
but then loop back to
Code: Select all
my $input = $interface->query($message, isPassword => 1,);
Code: Select all
if (!defined($input)) {
quit();
return;
}
it is defined above it but the condition returns true.