sub preinsert_hook_first {
my $self = shift;
return '' unless $self->pkgnum;
my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } );
sub preinsert_hook_first {
my $self = shift;
return '' unless $self->pkgnum;
my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } );
return '' unless $part_pkg && $part_pkg->can('usage_valuehash');
my %values = $part_pkg->usage_valuehash;
return '' unless $part_pkg && $part_pkg->can('usage_valuehash');
my %values = $part_pkg->usage_valuehash;
my $failure = gettext('illegal_password'). " $passwordmin-$passwordmax ".
FS::Msgcat::_gettext('illegal_password_characters').
": ". $pass;
my $failure = gettext('illegal_password'). " $passwordmin-$passwordmax ".
FS::Msgcat::_gettext('illegal_password_characters').
": ". $pass;
# The legacy behavior from check():
# If the password is blank, randomize it and set encoding to 'plain'.
# The legacy behavior from check():
# If the password is blank, randomize it and set encoding to 'plain'.