mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Impose minimum length on display name
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_signup.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2006-12-27 22:26:47 $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2006-12-30 22:39:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -115,6 +115,7 @@ define("LAN_SIGNUP_52", "Incorrect Password");
|
||||
define("LAN_SIGNUP_53", "field failed validation test");
|
||||
define("LAN_SIGNUP_54", "Click here to fill in your details to register");
|
||||
define("LAN_SIGNUP_55", "That display name is too long. Please choose another");
|
||||
define("LAN_SIGNUP_56", "That display name is too short. Please choose another");
|
||||
|
||||
|
||||
|
||||
|
@@ -4,9 +4,9 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_usersettings.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:34:40 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2006-12-30 22:39:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
define("PAGE_NAME", "User Settings");
|
||||
@@ -106,5 +106,6 @@ define("LAN_USET_8", "Signature / Timezone");
|
||||
define("LAN_USET_9", "Some of the required fields (marked with a *) are missing from your settings.");
|
||||
define("LAN_USET_10","Please update your settings now, in order to proceed.");
|
||||
define("LAN_USET_11", "That user name cannot be accepted as valid, please choose a different user name");
|
||||
define("LAN_USET_12", "That display name is too short. Please choose another");
|
||||
|
||||
?>
|
12
signup.php
12
signup.php
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/signup.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2006-12-27 22:26:41 $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2006-12-30 22:39:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -394,6 +394,14 @@ if (isset($_POST['register']))
|
||||
$_POST['name'] = $_POST['loginname'];
|
||||
}
|
||||
|
||||
// Impose a minimum length on display name
|
||||
$_POST['name'] = trim($_POST['name']);
|
||||
if (strlen($_POST['name']) < 2)
|
||||
{
|
||||
$error_message .= LAN_SIGNUP_56."\\n";
|
||||
$error = TRUE;
|
||||
}
|
||||
|
||||
// Check for disallowed names.
|
||||
if(isset($pref['signup_disallow_text']))
|
||||
{
|
||||
|
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/usersettings.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:33:10 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2006-12-30 22:39:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -181,6 +181,12 @@ if (isset($_POST['updatesettings']))
|
||||
}
|
||||
|
||||
// $username = strip_tags($_POST['username']);
|
||||
// Impose a minimum length on display name
|
||||
$_POST['username'] = trim($_POST['username']);
|
||||
if (strlen($_POST['username']) < 2)
|
||||
{
|
||||
$error .= LAN_USET_12."\\n";
|
||||
}
|
||||
|
||||
$user_sess = "";
|
||||
if ($file_userfile['error'] != 4)
|
||||
|
Reference in New Issue
Block a user