1
terrion
How to allow users to change user name (uname)
  • 2009/5/26 2:18

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


I've just upgraded from 2.2.5 to 2.3.3. I did not anticipate the problems I would have with the displayname no longer being used. How can I allow users to change their username (uname)? I can change it for them as admin, but on their profile edit screens there they can see their uname, but not change it.
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

2
Xend
Re: How to allow users to change user name (uname)
  • 2009/5/26 13:26

  • Xend

  • Friend of XOOPS

  • Posts: 37

  • Since: 2001/12/13


There ia a way to do this, i dont like it, and will never use it, but for a short time with users i now , it may be ok. The problem is that thay can edit email address too.

If you still want to do it this way.

Go into Admin "Control Panel"
Then go to "System Options" --> "Groups"
select Modefy on "Registered Users"
Find "Module Admin rights" and set the select box "User Profile"




"Learn from the mistakes of others; you can't live long enough to make them all yourself."

3
terrion
Re: How to allow users to change user name (uname)
  • 2009/5/27 6:25

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


Xend,

Thank you very much for your reply.

I totally agree that this should be a solution put in place for a very short time for the very reason you state.

As you can imagine, having 1000s of message board posts suddenly appearing with different names is quite disturbing to our community.

About your suggestion, can this open a vulnerability where people might be able to update other members profiles?

Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

4
terrion
Re: How to allow users to change user name (uname)
  • 2009/5/27 6:49

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


I've been playing with the suggested solution and because I'm running the new extended profiles modules it admin privlidges for the registered users group opens up too many vulnerabilites. The get an administration menu link in the user menu and suddenly they can be editing profile fields and such.

Anyways, looking at edituser.php in the root of xoops, it seems like I should be able to make a code change in this area:

if ($op == 'editprofile') {
    include_once 
XOOPS_ROOT_PATH.'/header.php';
    include_once 
XOOPS_ROOT_PATH.'/include/comment_constants.php';
    echo 
'.$xoopsUser->getVar('uid').'">'_US_PROFILE .»» '_US_EDITPROFILE .'';
    
$form = new XoopsThemeForm(_US_EDITPROFILE'userinfo''edituser.php''post'true);
    
$uname_label = new XoopsFormLabel(_US_NICKNAME$xoopsUser->getVar('uname'));
    
$form->addElement($uname_label);
    
$name_text = new XoopsFormText(_US_REALNAME'name'3060$xoopsUser->getVar('name''E'));
    
$form->addElement($name_text);
    
$email_tray = new XoopsFormElementTray(_US_EMAIL'');
    if (
$xoopsConfigUser['allow_chgmail'] == 1) {
        
$email_text = new XoopsFormText('''email'3060$xoopsUser->getVar('email'));
    } else {
        
$email_text = new XoopsFormLabel(''$xoopsUser->getVar('email'));
    }
    
$email_tray->addElement($email_text);
    
$email_cbox_value $xoopsUser->user_viewemail() ? 0;


Isn't there a way I can put the uname on that form in such a way it's an editable field instead of just a label?

Anyone have any suggestions?
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

Login

Who's Online

346 user(s) are online (200 user(s) are browsing Support Forums)


Members: 0


Guests: 346


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