From e547a2f54c2a2184d55c57c7712d4d50621f5fc2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 19 Apr 2010 18:45:50 +0200 Subject: Fix ticket #2289: registration links were showing in top nav bar, login page message when site set to invite-only or closed registration, when the 'register' action can't be used. --- actions/login.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'actions') diff --git a/actions/login.php b/actions/login.php index 8ea3c800b..dc6352368 100644 --- a/actions/login.php +++ b/actions/login.php @@ -267,9 +267,13 @@ class LoginAction extends Action 'user name and password ' . 'before changing your settings.'); } else { - return _('Login with your username and password. ' . - 'Don\'t have a username yet? ' . - '[Register](%%action.register%%) a new account.'); + $prompt = _('Login with your username and password.'); + if (!common_config('site', 'closed') && !common_config('site', 'inviteonly')) { + $prompt .= ' '; + $prompt .= _('Don\'t have a username yet? ' . + '[Register](%%action.register%%) a new account.'); + } + return $prompt; } } -- cgit v1.2.3-54-g00ecf