PHPee.com PHP development forum
space in username

 
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger bug reports
View previous topic :: View next topic  
Author Message
BHiker



Joined: 03 Jan 2004
Posts: 13
Location: Belgium

PostPosted: Sat Jan 03, 2004 5:46 pm    Post subject: space in username Reply with quote
When a new user signs up using
pphlogger/dspSignup.php
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.
Back to top
View user's profile Send private message
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 935
Location: London, UK

PostPosted: Sat Jan 03, 2004 7:32 pm    Post subject: Reply with quote
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.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
V@no



Joined: 15 Nov 2003
Posts: 156

PostPosted: Sat Jan 03, 2004 9:20 pm    Post subject: Reply with quote
I dont know if its gonna work, but try this:
in login.php find
Code:
if (!isset($password)) $password = $pw;
add after:
Code:
$username = str_replace(" ", "_", $username);

_________________
Back to top
View user's profile Send private message Visit poster's website
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 935
Location: London, UK

PostPosted: Sun Jan 04, 2004 7:29 pm    Post subject: Reply with quote
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.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
V@no



Joined: 15 Nov 2003
Posts: 156

PostPosted: Sun Jan 04, 2004 7:59 pm    Post subject: Reply with quote
yes your are right...this should be done by not letting spaces in the frist place Wink also, on some servers none-english letters can cause problems with database, does pphlogger has limit on "alowed" caracters?
_________________
Back to top
View user's profile Send private message Visit poster's website
sdjl
Moderator


Joined: 17 Nov 2003
Posts: 935
Location: London, UK

PostPosted: Sun Jan 04, 2004 10:44 pm    Post subject: Reply with quote
I don't believe there's any restrictions set, no.

David
_________________
-----
Free Logger Accounts | PPHlogger Manual | PM Me
Back to top
View user's profile Send private message Visit poster's website
Post new topic   Reply to topic    phpee.com Forum Index -> PPhlogger bug reports All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.11
Theme design based on Team 101 Designs, modified by Philip Iezzi