I modify user.pm to solve it:
change :
$user->{user_title} ||= generate_user_title($user->{user_posts});
to :
my $karma = $DB->table('Post')->select( { user_id_fk => $user->{user_id} }, 'SUM(post_karma)' )->fetchrow;
$user->{user_title} ||= generate_user_title($karma + $user->{user_posts});
It can work , But does there a simple way or not to modify user.pm?
change :
$user->{user_title} ||= generate_user_title($user->{user_posts});
to :
my $karma = $DB->table('Post')->select( { user_id_fk => $user->{user_id} }, 'SUM(post_karma)' )->fetchrow;
$user->{user_title} ||= generate_user_title($karma + $user->{user_posts});
It can work , But does there a simple way or not to modify user.pm?