Commit 13e6c22e authored by Leigh Stoller's avatar Leigh Stoller

Silence email for non-local projects to avoid admin panic.

parent 47fc101f
......@@ -345,7 +345,8 @@ TBGetSiteVar("general/firstinit/state", \$firstinitstate);
#
# Send the email notification.
#
$newproj->SendNewProjectEmail($firstinitstate eq "createproject");
$newproj->SendNewProjectEmail($firstinitstate eq "createproject")
if (!$nonlocal);
# Unlink this here, so that the newuser file is left behind in case of error.
# We can then create the user by hand from the xmlfile, if desired.
......
......@@ -51,6 +51,7 @@ my $CHOWN = "/usr/sbin/chown";
my $GRANTTYPE = "$TB/sbin/grantnodetype -d";
my $UPDATEPERMS = "$TB/sbin/update_permissions";
my $ELABINELAB = @ELABINELAB@;
my $MAINSITE = @TBMAINSITE@;
my $WIKISUPPORT = @WIKISUPPORT@;
my $BUGDBSUPPORT = @BUGDBSUPPORT@;
my $OPSDBSUPPORT = @OPSDBSUPPORT@;
......@@ -243,6 +244,7 @@ else {
$leader_uid = $leader->uid();
$isnonlocal = $target_project->IsNonLocal();
$wasactive = ($leader->status() eq USERSTATUS_ACTIVE() ? 1 : 0);
$silent = 1 if ($isnonlocal && !$MAINSITE);
# Approve the project; we are committed to the leader.
$target_project->SetApproved(1) == 0 or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment