Hello again
thank you for your offer to have a closer look at the problem. Unfortunately, I have only installed the software on a test server that has no internet connection. I will put the new files on a production server once I have tested the mod.
In the meantime, I have done some debugging and logging and it seems that I have discovered the problem: the line beginning with
$table->update(...) should start with $db->update(...).
Since I also want to have the profile changes logged, I've added another line of code.
Please check the code at the end of this message (I hope it's ok). I'm not a Perl-Guru
Thanks a lot your assistance.
Cheers,
Oliver
Code:
$COMPILE{profile_form} = <<'END_OF_SUB';
sub profile_form {
#------------------------------------------------------------------------
# Profile form
#
my($self,$msg) = @_;
return ('profile_form.html', {
msg => $self->_language('MSG_PROFILE'),
header => $self->_language('HEA_PROFILE')
});
}
END_OF_SUB
$COMPILE{profile} = <<'END_OF_SUB';
sub profile {
#------------------------------------------------------------------------
# Modify profile
#
my $self = shift;
my $user_tab = $self->{cfg}->{'user_table_use'};
my $db = $self->{sql}->table($user_tab);
my $cols = $db->cols;
my $info = {};
foreach my $c ( keys %$cols ) {
next if ( !$self->{cgi}->{'pro_'.$c} );
next if ( $c =~ /^(Username|Status|view_p|add_p|delete_p|modify_p|admin_p)/ );
$info->{$c} = $self->{cgi}->{'pro_'.$c};
}
$db->update($info, { 'Username' => $self->{user}->{Username} }) if ( $info );
$self->auth_logging('profile change ') if ( $self->{cfg}->{log_file} );
return ('home.html', {
msg => $self->_language('MSG_PROFILE_OK'),
header => $self->_language('HEA_HOME')
}); }
END_OF_SUB