Commit 8a2d838d authored by anarcat's avatar anarcat

#336068 - use the email from the drush option instead of the registered context

the rationale here is we need to get the value fromt he frontend directly, not the stored value, as we want to mail to the user that's set in the task, not the site
parent 63ca20ac
......@@ -82,7 +82,7 @@ The following settings will be used:
Aegir version: !version
Aegir platform path: !root
Aegir makefile: !makefile
Client email: !email
Admin email: !email
', array('!site' => $site,
'!fqdn' => drush_get_option('aegir_host'),
'!home' => drush_get_option('aegir_root'),
......
......@@ -7,7 +7,6 @@
$GLOBALS['url'] = d()->uri;
$GLOBALS['profile'] = d()->profile;
$GLOBALS['install_locale'] = d()->language;
$GLOBALS['client_email'] = d()->client_email;
$GLOBALS['base_url'] = provision_get_base_url();
......@@ -118,7 +117,8 @@ function install_main() {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION);
// This must go after drupal_bootstrap(), which unsets globals!
global $profile, $install_locale, $client_email;
global $profile, $install_locale;
require_once './modules/system/system.install';
require_once './includes/file.inc';
......@@ -193,6 +193,7 @@ function install_main() {
variable_set('install_profile', $profile);
$client_email = drush_get_option('client_email');
$account = install_create_admin_user($url, $client_email);
if ($client_email) {
install_send_welcome_mail($url, $account, $profile, $install_locale, $client_email);
......
......@@ -7,7 +7,6 @@
$GLOBALS['url'] = d()->uri;
$GLOBALS['profile'] = d()->profile;
$GLOBALS['install_locale'] = d()->language;
$GLOBALS['client_email'] = d()->client_email;
$GLOBALS['base_url'] = provision_get_base_url();
......@@ -45,7 +44,6 @@ function install_verify_settings() {
}
function install_create_admin_user($client_email = NULL) {
global $client_email;
if (!$client_email) {
$client_email = 'webmaster@localhost';
}
......@@ -129,7 +127,7 @@ function install_main() {
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION);
// This must go after drupal_bootstrap(), which unsets globals!
global $profile, $install_locale, $client_email, $conf, $url;
global $profile, $install_locale, $conf, $url;
require_once './modules/system/system.install';
require_once './includes/file.inc';
......@@ -353,6 +351,7 @@ function install_main() {
cache_clear_all();
variable_set('install_profile', $profile);
$client_email = drush_get_option('client_email');
$account = install_create_admin_user($url, $client_email);
if ($client_email) {
install_send_welcome_mail($url, $account, $profile, $install_locale, $client_email);
......
......@@ -7,7 +7,6 @@
$GLOBALS['url'] = d()->uri;
$GLOBALS['profile'] = d()->profile;
$GLOBALS['install_locale'] = d()->language;
$GLOBALS['client_email'] = d()->client_email;
$GLOBALS['base_url'] = provision_get_base_url();
define('MAINTENANCE_MODE', 'install');
......@@ -90,7 +89,9 @@ function install_mail($key, &$message, $params) {
function install_main() {
global $profile, $install_locale, $client_email, $conf, $url, $base_url;
global $profile, $install_locale, $conf, $url, $base_url;
$client_email = drush_get_option('client_email');
require_once DRUPAL_ROOT . '/includes/install.core.inc';
......
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