[BUG]Trying to register user 'Guestk' and gives me an error..

Started by .Steven, January 07, 2006, 05:19:45 AM

Previous topic - Next topic

.Steven

I am trying to register user 'guestk' and gives me an error:
QuoteThe username you tried to use contains the reserved name 'Guest'. Please try another username.
However I have tried disabling checking of the username and even cleaning out the "Set Reserved Names" List @ "/forums/index.php?action=regcenter" Still no avail...

L.G.S

Why would you want to register someone with on the most part the name 'guest'
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


.Steven


.Steven

Worse still I looked through most if not all files. and couldn't find any way this could happen... I then looked through the database, and didn't see anything. (BTW I just searched for guest and looked at thew surrounding lines/rows.

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

.Steven

QuoteHowever I have tried disabling checking of the username and even cleaning out the "Set Reserved Names" List @ "/forums/index.php?action=regcenter" Still no avail...

Ok... 'rootq' can register but not guestk

Dannii

Your list is empty? I really have no idea then. Could you just register the account through the admin panel and then give it to them?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

.Steven


Grudge

It's probably hard coded. I believe there is a function called validateUser or similar in Subs-Members.php. Sadly I'm not at home to check for sure, it should be a simple case of removing two lines of code.
I'm only a half geek really...

.Steven

I can't see it in subs-members

// Check if a name is in the reserved words list. (name, current member id, name/username?.)
function isReservedName($name, $current_ID_MEMBER = 0, $is_name = true)
{
global $user_info, $modSettings, $db_prefix;

$checkName = strtolower($name);

// Administrators are never restricted ;).
if (!allowedTo('moderate_forum') && ((!empty($modSettings['reserveName']) && $is_name) || !empty($modSettings['reserveUser']) && !$is_name))
{
$reservedNames = explode("\n", $modSettings['reserveNames']);
// Case sensitive check?
$checkMe = empty($modSettings['reserveCase']) ? $checkName : $name;

// Check each name in the list...
foreach ($reservedNames as $reserved)
{
if ($reserved == '')
continue;

// Case sensitive name?
$reservedCheck = empty($modSettings['reserveCase']) ? strtolower($reserved) : $reserved;
// If it's not just entire word, check for it in there somewhere...
if ($checkMe == $reservedCheck || (strpos($checkMe, $reservedCheck) !== false && empty($modSettings['reserveWord'])))
fatal_lang_error(244, true, array($reserved));
}

$censor_name = $name;
if (censorText($censor_name) != $name)
fatal_lang_error('name_censored', true, array($name));
}

// Get rid of any SQL parts of the reserved name...
$checkName = strtr($name, array('_' => '\\_', '%' => '\\%'));

// Make sure they don't want someone else's name.
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE " . (empty($current_ID_MEMBER) ? '' : "ID_MEMBER != $current_ID_MEMBER
AND ") . "(realName LIKE '$checkName' OR memberName LIKE '$checkName')
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
return true;
mysql_free_result($request);

// Does name case insensitive match a member group name?
$request = db_query("
SELECT ID_GROUP
FROM {$db_prefix}membergroups
WHERE groupName LIKE '$checkName'
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
return true;
mysql_free_result($request);

// Okay, they passed.
return false;
}

Quote// Administrators are never restricted ;).
(looks like they are)  :)
Also I've been searching for where: &$modSettings is set. You someone please point out where it is set? (looking for: $modSettings['reserveNames'])


Leipe Po

ALLWAYS BACK-UP THE FILES YOU ARE GOING TO EDIT

step 1:
download your current copy of Subs-Members.php

step 2:
open the version on your server(if you cant edit on your server, download another copy(to edit))

step 3:
open file

step 4:
FIND

if (stristr($regOptions['username'], $txt[28]) !== false)
fatal_lang_error(244, true, array($txt[28]));

and delete it

step 5:
save and upload edited file

step 6:
test it!
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

Pattie

Hi,

Quotestep 1:
download your current copy of Subs-Members.php

I am having the same problem.

I do not have a Sub-Members.php file.

I opened nearly every file which remotely looked like it would relate, but I couldn't find any values, i.e. the name list, for reserved names.

I do not want to disable or remove the feature, only modify it.  I'm new to php, but with it being hardcoded in, I would think I should be able to code it out then :)

Finding the Sub-Members.php file and a list of variables is a challenge, to say the least. :)

Does anyone know why I wouldn't have a Sub-Members.php file and if it is a necessary component, at the least needing to modify the reserved name list, and  where can I obtain it?

I just downloaded smf_1-0-6_install.zip and the Sub-Members.php file is not within that build.

Thank you,

Pattie

L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Pattie

Hi,

Quote from: L.G.S on March 02, 2006, 03:33:41 PM
Subs-members is not in 1.0.6, it's in 1.1 RC1/RC2

Thank you for taking the time to assist!  It was greatly appreciated!

Pattie

Advertisement: