From f33c74572b530d3ab92d8fc7dfe86dedcb89b0a0 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sat, 25 Jan 2014 14:42:02 +0000 Subject: #1237005 - "Request new user account" fails when all trees are private --- login.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/login.php b/login.php index e7827fa81a..ddbf8303a0 100644 --- a/login.php +++ b/login.php @@ -171,11 +171,17 @@ default:
-
- ', WT_I18N::translate('Request new password'), ' -
'; - if (WT_Site::preference('USE_REGISTRATION_MODULE')) { - echo '
', WT_I18N::translate('Request new user account'), '
'; + '; + // Emails are sent from a TREE, not from a SITE. Therefore if there is no + // tree available (initial setup or all trees private), then we can't send email. + if ($WT_TREE) { + echo ' +
+ ', WT_I18N::translate('Request new password'), ' +
'; + if (WT_Site::preference('USE_REGISTRATION_MODULE')) { + echo '
', WT_I18N::translate('Request new user account'), '
'; + } } echo ''; -- cgit v1.3