sub precheck_callback {
my $cgi = shift;
- my $o = FS::access_user->new({username => $cgi->param('username')});
+ my $o = FS::access_user->new({username => scalar($cgi->param('username'))});
if( $o->is_system_user and !$cgi->param('usernum') ) {
$cgi->param('username','');
return "username '".$o->username."' reserved for system account."
if ( length($cgi->param('_password')) ) {
my $password = scalar($cgi->param('_password'));
- $access_user->change_password_fields($password);
+ my $error = $access_user->is_password_allowed($password)
+ || $access_user->change_password($password);
}
}