Commit f3886f24 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add a little ditty to send a test message to a user (hung off the

Manage User Profile) menu.
parent 5cf8cbc1
# Copyright (c) 2000-2003, 2005 University of Utah and the Flux Group.
# All rights reserved.
# Only known and logged in users can do this.
$uid = GETLOGIN();
$isadmin = ISADMIN($uid);
# Verify form arguments.
if (!isset($target_uid) ||
strcmp($target_uid, "") == 0) {
USERERROR("You must provide a User ID.", 1);
PAGEHEADER("Send a Test Message");
if (!$isadmin) {
USERERROR("You do not have permission to view this page!", 1);
if (! TBCurrentUser($target_uid)) {
USERERROR("$target_uid is not a valid user ID!", 1);
# Get email info and Key,
TBUserInfo($target_uid, $usr_name, $usr_email);
$key = TBGetVerificationKey($target_uid);
if (!$key || !strcmp($key, "")) {
USERERROR("$target_uid does not have a valid verification key!", 1);
# Send the email.
TBMAIL("$usr_name '$target_uid' <$usr_email>",
"This is a test",
"Dear $usr_name ($target_uid):\n".
"This is a test message to validate the email address that we\n".
"(Emulab) have in our database. Please respond to this message\n".
"as soon as you receive it. If we do not hear back from you, we\n".
"may be forced to freeze your account!\n".
"Thank you very much!\n".
"Testbed Operations\n",
"From: $TBMAIL_OPS\n".
"Bcc: $TBMAIL_OPS\n".
"Errors-To: $TBMAIL_WWW");
echo "<center>
# Standard Testbed Footer
......@@ -210,6 +210,10 @@ if ($isadmin) {
WRITESUBMENUBUTTON("Resend Verification Key",
else {
WRITESUBMENUBUTTON("Send Test Email Message",
Supports Markdown
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