Gossamer Forum
Quote Reply
I have added MailArc to take the input from a Listserv list everything works fine but each member of the list that posts when it is archived to the forum a new user is created in GT Forum with his/her email address as the username.

I have set up a user cepol_arc in GT Forum with an email address being that of the listserv.

I would prefer the poster to be cepol_arc rather than JohnDoe@domain.com. Is there anything I can do to alleviate this or will it require a great deal of hacking in MailArc.

Quote Reply
Re: [balita] Mailarc In reply to
Further to my posting a problem has occured from those whose list posting has appeared through MailArc.

As I said when a message is passed from the list to GT Forum through MailArc it's author is identified as say, john.doe@domain.com. The problem starts if that user tries to register/log on to the forum. He has nothing to log into the account is there but has no password associated with it.

I have tried setting up an account for Jane Doe at jane.doe@domain.com but when Jane Doe posts instead of being identified with the account I have set up a new account is setup with the username jane.doe@domain.com .

Apart from the fact that email addresses are being posted on the forum how do I make MailArc posting appear under the name of the registrant rather than a new account being created for each posting.

Quote Reply
Re: [balita] Mailarc In reply to
I added this functionality to my forum for the reason you outlined. I had to hack the MailArc.pm file. Let me pull it out and send it to you. I have it set to check the incoming email address, if found, post under the username. If not found, post under a generic Listserv account I created.....it will never create users as it was originally coded to do.

Quote Reply
Re: [bretzke] Mailarc In reply to
I changed the code in MailArc.pm in the Create Disabled User section....I have commented out most of the code and added what I needed.....here is the code I am running now:

sub create_disabled_user {
# Create new disabled user
my ($self, $opts) = @_;
my $table = $DB->table('User');
my $rs = $table->select({user_email => $self->{user}->{user_name}})->fetchrow_hashref;

if ($rs->{user_username}) {
$self->{user}->{user_id} = $rs->{user_id};
$self->{user}->{user_name} = $rs->{user_username};

else {
$self->{user}->{user_id} = "22";
$self->{user}->{user_name} = "Listserv";

# else {
# my $cols = $table->{schema}->{cols};
# my $fields;
# $fields->{user_username} = $self->{user}->{user_name};
# $fields->{user_email} = $self->{user}->{user_name};
# $fields->{user_disp_email} = $self->{user}->{user_name};
# $fields->{user_default_reply_notify} = 0;
# $fields->{user_enabled} = 0;
# local $CFG->{username_max_length} = 50;
# $fields->{user_email} = 'none@example.com' unless $fields->{user_email} =~ /.\@.+\..+/;
# my $sth = $table->insert($fields) or return $self->error(WARNING => FATAL => $GT::SQL::error);
# $self->{user}->{user_id} = $sth->insert_id;
# }


Hope this helps!