From 2e769649abf4f9b3712287e24eb42c5a93a8035e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 9 Oct 2011 15:41:59 -0400 Subject: Link to the userlist from the user registration page, if anon_userlist is enabled. --- src/controllers/Users.class.php | 7 ++++++- src/views/pages/users/new.html.php | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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, ". + "please 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); } -- cgit v1.2.3