summaryrefslogtreecommitdiff
path: root/fs_webdemo/registerd.Pg
diff options
context:
space:
mode:
authorivan <ivan>2001-04-23 16:25:05 +0000
committerivan <ivan>2001-04-23 16:25:05 +0000
commit37b880826261a0caee14508aeaafa9da28bd043a (patch)
treef7a8d6f70b0e4327f66873a9b960663c3c399c38 /fs_webdemo/registerd.Pg
parentd2f0f6a76d1417f2aba85b035fa2f04f095f50e3 (diff)
working registerd.Pg
Diffstat (limited to 'fs_webdemo/registerd.Pg')
-rwxr-xr-xfs_webdemo/registerd.Pg74
1 files changed, 35 insertions, 39 deletions
diff --git a/fs_webdemo/registerd.Pg b/fs_webdemo/registerd.Pg
index a4fd0552c..471384137 100755
--- a/fs_webdemo/registerd.Pg
+++ b/fs_webdemo/registerd.Pg
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
-# $Id: registerd.Pg,v 1.1 2001-04-23 12:40:30 ivan Exp $
+# $Id: registerd.Pg,v 1.2 2001-04-23 16:25:05 ivan Exp $
use strict;
use vars qw(
@@ -65,13 +65,13 @@ while ( 1 ) {
$sth->execute or die $sth->errstr;
$sth = $dbh->prepare(
- 'SELECT * FROM mysql_auth WHERE status = "unconfigured" OR status = "reconfigure"'
+ 'SELECT * FROM mysql_auth WHERE status = "unconfigured"'
);
$sth->execute or die $sth->errstr;
my $pending = $sth->fetchall_arrayref( {} );
$sth = $dbh->prepare(
- 'UPDATE mysql_auth SET status = "locked" WHERE status = "unconfigured" OR status = "reconfigure"'
+ 'UPDATE mysql_auth SET status = "locked" WHERE status = "unconfigured"'
);
$sth->execute or die $sth->errstr;
@@ -84,7 +84,6 @@ while ( 1 ) {
my $username = $row->{'username'};
my $email = $row->{'passwd'};
- my $status = $row->{'status'};
system("/usr/bin/createdb --username freeside demo_$username >/dev/null");
@@ -145,41 +144,38 @@ while ( 1 ) {
);
$sth->execute or die $sth->errstr;
- if ( $status eq "unconfigured" ) {
-
- #$ENV{SMTPHOSTS} = "localhost";
- $ENV{SMTPHOSTS} = "192.168.1.1";
- $ENV{MAILADDRESS} = 'ivan-fsreg@sisd.com';
- $ENV{TZ} = "PST8PDT";
- $header = Mail::Header->new( [
- 'From: ivan-fsreg@sisd.com',
- "To: $email",
- 'Bcc: ivan-fsreg_bcc@sisd.com',
- 'Sender: ivan-fsreg@sisd.com',
- 'Reply-To: ivan-fsreg@sisd.com',
- #'Date: '. time2str("%a, %d %b %Y %X %z", time ),
- 'Date: '. time2str("%a, %d %b %Y %X ", time ). "-0800",
- 'Subject: Freeside demo information',
- ] );
- $msg = Mail::Internet->new(
- 'Header' => $header,
- 'Body' => [
- "Hello,\n",
- "\n",
- "Your sample Freeside database has been setup.\n",
- "\n",
- "Point your web browswer at http://freeside.sisd.com/ and use the following\n",
- "authentication information:\n",
- "\n",
- "Username: $username\n",
- "Password: $user_pw\n",
- "\n",
- "-- \n",
- "ivan\n",
- ]
- );
- $msg->smtpsend or die "Can\'t send registration email!";
- }
+ #$ENV{SMTPHOSTS} = "localhost";
+ $ENV{SMTPHOSTS} = "192.168.1.1";
+ $ENV{MAILADDRESS} = 'ivan-fsreg@sisd.com';
+ $ENV{TZ} = "PST8PDT";
+ $header = Mail::Header->new( [
+ 'From: ivan-fsreg@sisd.com',
+ "To: $email",
+ 'Bcc: ivan-fsreg_bcc@sisd.com',
+ 'Sender: ivan-fsreg@sisd.com',
+ 'Reply-To: ivan-fsreg@sisd.com',
+ #'Date: '. time2str("%a, %d %b %Y %X %z", time ),
+ 'Date: '. time2str("%a, %d %b %Y %X ", time ). "-0800",
+ 'Subject: Freeside demo information',
+ ] );
+ $msg = Mail::Internet->new(
+ 'Header' => $header,
+ 'Body' => [
+ "Hello,\n",
+ "\n",
+ "Your sample Freeside database has been setup.\n",
+ "\n",
+ "Point your web browswer at http://freeside.sisd.com/ and use the following\n",
+ "authentication information:\n",
+ "\n",
+ "Username: $username\n",
+ "Password: $user_pw\n",
+ "\n",
+ "-- \n",
+ "ivan\n",
+ ]
+ );
+ $msg->smtpsend or die "Can\'t send registration email!";
}