Author |
Message |
Donovan
Client

Joined: Oct 07, 2003
Posts: 735
Location: Ohio
|
Posted:
Thu Nov 17, 2005 7:33 pm |
|
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. |
|
|
 |
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Thu Nov 17, 2005 11:32 pm |
|
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 search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Donovan

|
Posted:
Fri Nov 18, 2005 8:03 am |
|
kguske wrote: | ... modify the user administration function to bypass this "error." |
How? |
|
|
|
 |
kguske

|
Posted:
Mon Nov 21, 2005 6:37 am |
|
Are you using the standard Your Account or an enhanced version (I can't remember). |
|
|
|
 |
Donovan

|
Posted:
Mon Nov 21, 2005 7:55 am |
|
I was going thru the forum ACP and manage users at the bottom. |
|
|
|
 |
kguske

|
Posted:
Mon Nov 21, 2005 10:20 am |
|
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

|
Posted:
Mon Nov 21, 2005 6:11 pm |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Mon Nov 21, 2005 7:57 pm |
|
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! |
|
|
 |
kguske

|
Posted:
Tue Nov 22, 2005 9:13 pm |
|
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. |
|
|
|
 |
|