summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 15:41:59 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-10-09 15:41:59 -0400
commit2e769649abf4f9b3712287e24eb42c5a93a8035e (patch)
tree5b7b23cf8ad9ffcda182c536c63f7f9ec42a54e2
parent710942016b2a363f1301259dac01410188707d85 (diff)
Link to the userlist from the user registration page, if anon_userlist is enabled.
-rw-r--r--src/controllers/Users.class.php7
-rw-r--r--src/views/pages/users/new.html.php10
2 files changed, 16 insertions, 1 deletions
diff --git a/src/controllers/Users.class.php b/src/controllers/Users.class.php
index ac6b06a..dbd5120 100644
--- a/src/controllers/Users.class.php
+++ b/src/controllers/Users.class.php
@@ -72,8 +72,13 @@ class Users extends Controller {
exit();
}
if (!isset($vars['errors'])) $vars['errors'] = array();
- global $mm; $pm = $mm->pluginManager();
+
+ global $mm;
+ $pm = $mm->pluginManager();
+ $db = $mm->database();
+
$vars['antispam_html'] = $pm->callHook('antispam_html');
+ $vars['userlist'] = $db->getSysConf('anon_userlist');
$this->showView('users/new', $vars);
}
diff --git a/src/views/pages/users/new.html.php b/src/views/pages/users/new.html.php
index 8b6bdf8..9df376f 100644
--- a/src/views/pages/users/new.html.php
+++ b/src/views/pages/users/new.html.php
@@ -7,6 +7,16 @@ $t->openTag('form', array('method'=>'post',
'action'=>$t->url('users')));
$t->openFieldset("New User: Step 1");
+
+if ($VARS['userlist']) {
+ $t->inputP("If you may have already created a username, please, ".
+ "<em>please</em> check the ".
+ $t->link($t->url('users/'), 'user-list', true).
+ " to find your old username, instead of creating a new ".
+ "user. If you don't like the name, you can log in and ".
+ "change it.");
+}
+
if (in_array('illegal name', $VARS['errors'])) {
$t->inputP("That is a forbidden username.", true);
}