MyBB Community Forums

Full Version: [F] Strange code in newreply.php [C-Imad Jomaa]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Sorry, correction, they are not required to enter it maybe, but whatever is entered or left from the defaults is checked against current existing users.
(2009-01-28, 09:54 PM)neverendingo Wrote: [ -> ]Sorry, correction, they are not required to enter it maybe, but whatever is entered or left from the defaults is checked against current existing users.

Ah, right. I see your point now. The username field is by default set to "Guest". I'm not really sure if this should be considered an actual MyBB bug. Either we disable registering with the username "Guest" or we don't have a default value.
Yes, either way would be good. But disabling "Guest" for registering is probably the best solution, as it prevents confusion, maybe some REAL guests fill in "Guest" again and wonder why it doesn't work. Wink
Alright, so for now the solution for is to rename that user from "Guest" to something else and then put it on the banned usernames list so they can reg with it again
in newreply.php find:

if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newreply")
{
     $username = $lang->guest;
}

and replace with

if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newreply")
{
     $username = '';
}

also in newthread.php find:

if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newthread")
{
     $username = $lang->guest;
}

and replace with

if(!$mybb->input['previewpost'] && $mybb->input['action'] != "do_newthread")
{
     $username = '';
}
Just wanted to double check if this seems to be working for you?
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
Pages: 1 2