PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Donovan
Client


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

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

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: 4888

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

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."
View user's profile Send private message
Donovan
Client


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

PostPosted: Fri Nov 18, 2005 8:03 am Reply with quote Back to top

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


How?
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4888

PostPosted: Mon Nov 21, 2005 6:37 am Reply with quote Back to top

Are you using the standard Your Account or an enhanced version (I can't remember).
View user's profile Send private message
Donovan
Client


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

PostPosted: Mon Nov 21, 2005 7:55 am Reply with quote Back to top

I was going thru the forum ACP and manage users at the bottom.
View user's profile Send private message Visit poster's website ICQ Number
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4888

PostPosted: Mon Nov 21, 2005 10:20 am Reply with quote Back to top

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?
View user's profile Send private message
Donovan
Client


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

PostPosted: Mon Nov 21, 2005 6:11 pm Reply with quote Back to top

Standard Your Account
View user's profile Send private message Visit poster's website ICQ Number
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2856

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

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
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4888

PostPosted: Tue Nov 22, 2005 9:13 pm Reply with quote Back to top

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.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum