diff --git a/config/branding/config.ini b/config/branding/config.ini index d339c773..2d40aa6e 100644 --- a/config/branding/config.ini +++ b/config/branding/config.ini @@ -49,6 +49,8 @@ admin = "hpc@it.umass.edu" admin_name = "Unity Cluster Admins" sender = "updates@unity.rc.umass.edu" sender_name = "Unity Cluster Updates" +pi_approve = "piapproval@umass.edu" +pi_approve_name = "PI Approval" [page] ; which sql objects to use for the content on these pages home = "home" diff --git a/resources/init.php b/resources/init.php index ae52b760..bae0959e 100644 --- a/resources/init.php +++ b/resources/init.php @@ -66,7 +66,9 @@ $BRANDING["mail"]["support"], $BRANDING["mail"]["support_name"], $BRANDING["mail"]["admin"], - $BRANDING["mail"]["admin_name"] + $BRANDING["mail"]["admin_name"], + $BRANDING["mail"]["pi_approve"], + $BRANDING["mail"]["pi_approve_name"] ); // diff --git a/resources/lib/UnityGroup.php b/resources/lib/UnityGroup.php index 72359f80..dde43d63 100644 --- a/resources/lib/UnityGroup.php +++ b/resources/lib/UnityGroup.php @@ -93,6 +93,17 @@ public function requestGroup($send_mail = true) "email" => $this->getOwner()->getMail() ) ); + + $this->MAILER->sendMail( + "pi_approve", + "group_request_admin", + array( + "user" => $this->getOwner()->getUID(), + "org" => $this->getOwner()->getOrg(), + "name" => $this->getOwner()->getFullname(), + "email" => $this->getOwner()->getMail() + ) + ); } } diff --git a/resources/lib/UnityMailer.php b/resources/lib/UnityMailer.php index 9d2c728c..90c39414 100644 --- a/resources/lib/UnityMailer.php +++ b/resources/lib/UnityMailer.php @@ -19,6 +19,8 @@ class UnityMailer extends PHPMailer private $MSG_SUPPORT_NAME; private $MSG_ADMIN_EMAIL; private $MSG_ADMIN_NAME; + private $MSG_PI_APPROVAL_EMAIL; + private $MSG_PI_APPROVAL_NAME; public function __construct( $template_dir, @@ -34,7 +36,9 @@ public function __construct( $msg_support_email, $msg_support_name, $msg_admin_email, - $msg_admin_name + $msg_admin_name, + $msg_pi_approval_email, + $msg_pi_approval_name ) { parent::__construct(); $this->isSMTP(); @@ -87,6 +91,8 @@ public function __construct( $this->MSG_SUPPORT_NAME = $msg_support_name; $this->MSG_ADMIN_EMAIL = $msg_admin_email; $this->MSG_ADMIN_NAME = $msg_admin_name; + $this->MSG_PI_APPROVAL_EMAIL = $msg_pi_approval_email; + $this->MSG_PI_APPROVAL_NAME = $msg_pi_approval_name; } public function sendMail($recipients, $template = null, $data = null) @@ -105,6 +111,8 @@ public function sendMail($recipients, $template = null, $data = null) if ($recipients == "admin") { $this->addBCC($this->MSG_ADMIN_EMAIL, $this->MSG_ADMIN_NAME); + } elseif ($recipients == "pi_approve") { + $this->addBCC($this->MSG_PI_APPROVAL_EMAIL, $this->MSG_PI_APPROVAL_NAME); } else { if (is_array($recipients)) { foreach ($recipients as $addr) {