xoops forums

SLEO577

Not too shy to talk
Posted on: 2006/10/19 5:55
SLEO577
SLEO577 (Show more)
Not too shy to talk
Posts: 110
Since: 2005/6/27
#11

Re: Can't edit signature

I realize this is an old thread, but it wasn't until I started a new site that I had the same old problem.

The problem is due to a hack in preventing members from changing their own "Displayname." This hack is preventing members from editing their profiles also. Apparently, the hacked file:

open -> modules/profile/include/forms.php (line 406)
$uname_tray = new XoopsFormElementTray(_PROFILE_MA_DISPLAYNAME'<br />');
    if (
$user->isNew() || $xoopsModuleConfig['allow_chgdisplayname'] == || $xoopsUser->isAdmin()) {
        
$uname_text = new XoopsFormText('''uname'3060$user->getVar('uname'));
    } else {
        
$uname_text = new XoopsFormLabel(''$user->getVar('uname'));
    }
    
$uname_tray->addElement($uname_text, ($user->isNew() || $xoopsModuleConfig['allow_chgdisplayname'] == 1));
    
$elements[0][] = array('element' => $uname_tray'required' => 0);
    
$weights[0][] = 0;


Needs to be changed to the following in red:
$uname_tray = new XoopsFormElementTray(_PROFILE_MA_DISPLAYNAME'<br />');
    if (
$user->isNew() || $xoopsModuleConfig['allow_chgdisplayname'] == [b][color=CC0000]0[/color][/b] || $xoopsUser->isAdmin()) {
        
$uname_text = new XoopsFormText('''uname'3060$user->getVar('uname'));
    } else {
        
$uname_text = new XoopsFormLabel(''$user->getVar('uname'));
    }
    
$uname_tray->addElement($uname_text, ($user->isNew() || $xoopsModuleConfig['allow_chgdisplayname'] == [b][color=CC0000]0[/color][/b]));
    
$elements[0][] = array('element' => $uname_tray'required' => 0);
    
$weights[0][] = 0;


If you do change the vales to "0" from "1", it wipes out the users "Real Name" from the DB tables and allows the users to once again change their "Displayname." But at least they can edit their profiles.

I am going to be working on this issue until I can get it fixed. Obviously, the "Displayname" issue has been a hot topic for XOOPS 2.2.x. But members need the ability to edit their profiles in addition to preventing users from maliciously changing their displayname all the time.

Read m0nty's post on the ability to enable/disable users from changing their displayname once set.

If someone has solved this problem already, please post your results.

SLEO577

Not too shy to talk
Posted on: 2006/10/23 14:05
SLEO577
SLEO577 (Show more)
Not too shy to talk
Posts: 110
Since: 2005/6/27
#12

Re: Can't edit signature

Has anyone got this working?

*BUMP*