diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-01-25 14:42:02 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-01-25 14:42:02 +0000 |
| commit | f33c74572b530d3ab92d8fc7dfe86dedcb89b0a0 (patch) | |
| tree | 49610ea2525f60c4ff7c99fb86dc2a6181a20a58 | |
| parent | 7d724160ef01d6cfd858a04d31a2557f92369abb (diff) | |
| download | webtrees-f33c74572b530d3ab92d8fc7dfe86dedcb89b0a0.tar.gz webtrees-f33c74572b530d3ab92d8fc7dfe86dedcb89b0a0.tar.bz2 webtrees-f33c74572b530d3ab92d8fc7dfe86dedcb89b0a0.zip | |
#1237005 - "Request new user account" fails when all trees are private
| -rw-r--r-- | login.php | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -171,11 +171,17 @@ default: <div> <input type="submit" value="', WT_I18N::translate('Login'), '"> </div> - <div> - <a href="#" id="passwd_click">', WT_I18N::translate('Request new password'), '</a> - </div>'; - if (WT_Site::preference('USE_REGISTRATION_MODULE')) { - echo '<div><a href="'.WT_LOGIN_URL.'?action=register">', WT_I18N::translate('Request new user account'), '</a></div>'; + '; + // 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 ' + <div> + <a href="#" id="passwd_click">', WT_I18N::translate('Request new password'), '</a> + </div>'; + if (WT_Site::preference('USE_REGISTRATION_MODULE')) { + echo '<div><a href="'.WT_LOGIN_URL.'?action=register">', WT_I18N::translate('Request new user account'), '</a></div>'; + } } echo '</form>'; |
