1
irmtfan
change username
  • 2003/12/25 13:07

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i want to allow to users that change own usernames.
now this is not impossible for users & i want change it.
even webmaster can not change own username.

also another question that i want to use space in my username what can i do?
merry christmas

2
AAINC
Re: change username
  • 2003/12/25 14:16

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


EDIT****
OOps

Either admin changes their nickname or you rewrite code to allow non admin to edit nickname.
There may be another way, but I looked and do not see an option to allow a registered user to change their own nickname.


For the space just place an underscore your_name

AAINC

3
irmtfan
Re: change username
  • 2003/12/25 14:43

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:
Either admin changes their nickname or you rewrite code to allow non admin to edit nickname.

thank u very much for point to nickename.
is there any way to allow registered users change their nickenames.
It is very important

4
CBlue
Re: change username

Maybe there is a way to edit the edituser.php page to allow users to edit their own usernames. Since they are allowed to edit their real name, maybe looking at the code below the username code is a clue. I will look at the page and report here is I am able to edit it and have it work.

5
AAINC
Re: change username
  • 2003/12/25 15:12

  • AAINC

  • Not too shy to talk

  • Posts: 121

  • Since: 2003/10/18


Just adding
Quote:

$edituser->setVar('uname', $uname);

did not seem to work.

maybe adding
Quote:

include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
echo ''. _US_PROFILE .' »» '. _US_EDITPROFILE .'

';
$form = new XoopsThemeForm(_US_EDITPROFILE, 'userinfo', 'edituser.php');
$uname_label = new XoopsFormLabel(_US_NICKNAME, $xoopsUser->getVar('uname'));
$form->addElement($uname_label);



Oh well
gotta go get some Mountain Dew....

6
CBlue
Re: change username

Include that where? In edituser.php, AAINC?

7
kahumbu
Re: change username
  • 2003/12/25 22:39

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


Quote:

irmtfan wrote:
also another question that i want to use space in my username what can i do?
merry christmas

For this, go to Admin Menu -> System Admin -> Preferences -> User Info Settings and Select the level of strictness for usernames. I'm not sure about the medium setting, but the light setting definitely allows spaces in the username.


8
Dave_L
Re: change username
  • 2003/12/26 3:16

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Here are the character sets allowed in usernames, from register.php:

$strict 'a-zA-Z0-9_-';
$medium $strict."<>,.$%#@!'"";
$loose = $medium."?{}[]()^&*`~;:\+=";


There's also a separate check that appears to exclude spaces:

if ( strrpos($uname,' ') > ) {
   
$stop .= _US_NICKNAMENOSPACES."";
}


When I get ready to use XOOPS on my site, I'll probably tweak that a bit. I'll add a line of code to "squash" multiple spaces, add "." and " " (space) to $strict, and remove the extra check for spaces.

9
kahumbu
Re: change username
  • 2003/12/26 6:20

  • kahumbu

  • Documentation Writer

  • Posts: 277

  • Since: 2003/8/23


I take back what I said about the light setting. I verified with my partner--his username has a space in between 2 words--and he did not use any of the settings in XOOPS but changed it in the DB through phpmyadmin.

So I guess spaces aren't allowed by default.

Login

Who's Online

330 user(s) are online (223 user(s) are browsing Support Forums)


Members: 0


Guests: 330


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits