Gossamer Forum
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!

Dave

Subject Author Views Date
Thread Mailarc balita 3019 Sep 24, 2003, 9:46 AM
Thread Re: [balita] Mailarc
balita 2921 Sep 25, 2003, 12:59 AM
Thread Re: [balita] Mailarc
bretzke 2914 Sep 25, 2003, 6:25 AM
Post Re: [bretzke] Mailarc
bretzke 2907 Sep 25, 2003, 8:17 AM