From 729f246f92ccb359e0f034b712be2045824bdee8 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Thu, 26 Jul 2012 17:41:14 -0400 Subject: [PATCH] Add a checkbox to allow administrators to re-send the welcome email to users. Summary: See title - This simply adds a checkbox to the "Edit User" page in the admin view, to allow an administrator to re-send the "Welcome to Phabricator" email. Test Plan: Sent myself another welcome email using the checkbox. Created a new user using the admin panel, to make sure emails still get sent for new users. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1524 Differential Revision: https://secure.phabricator.com/D3081 --- .../PhabricatorPeopleEditController.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/applications/people/controller/PhabricatorPeopleEditController.php b/src/applications/people/controller/PhabricatorPeopleEditController.php index 13c3a5a1fc..a1612d990c 100644 --- a/src/applications/people/controller/PhabricatorPeopleEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleEditController.php @@ -179,10 +179,10 @@ final class PhabricatorPeopleEditController id(new PhabricatorUserEditor()) ->setActor($admin) ->createNewUser($user, $email); + } - if ($welcome_checked) { - $user->sendWelcomeEmail($admin); - } + if ($welcome_checked) { + $user->sendWelcomeEmail($admin); } $response = id(new AphrontRedirectResponse()) @@ -264,6 +264,15 @@ final class PhabricatorPeopleEditController id(new AphrontFormStaticControl()) ->setLabel('Email') ->setValue($status)); + + $form->appendChild( + id(new AphrontFormCheckboxControl()) + ->addCheckbox( + 'welcome', + 1, + 'Re-send "Welcome to Phabricator" email.', + false)); + } $form->appendChild($this->getRoleInstructions());