Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> PHP-Nuke Patched Series By Chatserv
Author Message
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Thu Nov 17, 2005 7:33 pm Reply with quote

I upgraded my site to 3.1 and now when I try to change somebodies username I get:

Quote:
Sorry, but this username contains an invalid character such as '.


I would really like to be able to change usernames like I used to before.

For example before the patch, the username Copeland I was able to change it to Copeland [45th ID], adding a "clan" tag. Now I can't.

How can I fix this.
 
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Thu Nov 17, 2005 11:32 pm Reply with quote

There may be valid reasons for not allowing spaces and or characters like the brackets you mentioned. Other than bad HTML, I can't think of any at the moment, but if there are no strong reasons, you could probably modify the user administration function to bypass this "error."

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Donovan
PostPosted: Fri Nov 18, 2005 8:03 am Reply with quote

kguske wrote:
... modify the user administration function to bypass this "error."


How?
 
kguske
PostPosted: Mon Nov 21, 2005 6:37 am Reply with quote

Are you using the standard Your Account or an enhanced version (I can't remember).
 
Donovan
PostPosted: Mon Nov 21, 2005 7:55 am Reply with quote

I was going thru the forum ACP and manage users at the bottom.
 
kguske
PostPosted: Mon Nov 21, 2005 10:20 am Reply with quote

Sorry, I meant are you using the standard Your Account module that came with your version of PHP-Nuke, or are you using NSN-YA or CNB-YA?
 
Donovan
PostPosted: Mon Nov 21, 2005 6:11 pm Reply with quote

Standard Your Account
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Nov 21, 2005 7:57 pm Reply with quote

This specific check is only in the Forums Profile

includes/functions_validate.php
Code:


        // Don't allow " and ALT-255 in username.
        if (strstr($username, '"') || strstr($username, '"') || strstr($username, chr(160)))
        {
                return array('error' => true, 'error_msg' => $lang['Username_invalid']);
        }

Removing that code will stop this message, however it may make your site more vulnerable to hackers. Do so at your own risk

--

There is a seperate check in the Your_Account module
modules/Your_Account/index.php

Code:


function userCheck($username, $user_email) {

This function is what you'll want to edit probably. Again, it may make your site more vulnerable - do so at your own risk

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
kguske
PostPosted: Tue Nov 22, 2005 9:13 pm Reply with quote

Another option would be to add a parameter to the validate_username function that determines whether to check for characters (and default the value to true), then modify the call to the function from the admin_users function to be false. That would turn off the check only for admins.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> PHP-Nuke Patched Series By Chatserv

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©