Page 1 of 1

space in username

PostPosted: Sat Jan 03, 2004 6:46 pm
by BHiker
When a new user signs up using
and the username contains a space,
the space is replaced by a _ in the database

The next time the user logs in, he cannot use a space, an _ in his name works fine.

The subscription mail contains the right information, but no warning.

It would be better to javascript validate the input to prevent this confusing situation.

PostPosted: Sat Jan 03, 2004 8:32 pm
by sdjl
ah yes, i can re-create this error.

When someone signs up with a space, everything, to them, is reflected as being successful.
However in the admin section, their username shows with an _ instead of the space.


PostPosted: Sat Jan 03, 2004 10:20 pm
by V@no
I dont know if its gonna work, but try this:
in login.php find
Code: Select all
if (!isset($password)) $password = $pw;
add after:
Code: Select all
$username = str_replace(" ", "_", $username);

PostPosted: Sun Jan 04, 2004 8:29 pm
by sdjl
That would be a temporary fix for the login page only really.
You'd have to modify some code so that the pphlogger.js file had the correct username in as well.

You could add a check to the dspsignup.php script to tell users that they cant use spaces.


PostPosted: Sun Jan 04, 2004 8:59 pm
by V@no
yes your are right...this should be done by not letting spaces in the frist place ;) also, on some servers none-english letters can cause problems with database, does pphlogger has limit on "alowed" caracters?

PostPosted: Sun Jan 04, 2004 11:44 pm
by sdjl
I don't believe there's any restrictions set, no.