1
dickinsd
Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/7 21:18

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Hi.

I quite like the ability to easily add fields to the registration and user profile screens.

However I can't find where the Displayname option is.

I don't see the need for it and want it removed from the registration process.

Can anyone tell me where this field is?

If not I guess I can remove it from the register.php file?? But will this have any effect on the rest of the registration process?

I notice it has a * by it, so if I just remove it from the register.php file, will people still be able to register?

Dave

2
dickinsd
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/7 21:56

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


I have tried removing displayname from /modules/profile/register.php

this did nothing so I am trying to remove it from /modules/profile/include/form.php

I have now managed to remove it from the registration form, however when I try to register a user, I fill the compulsary fields and then hit submit, at this point I get an error:

Quote:
Displayname is too short. It must be more than 3 characters.
ERROR: Displayname taken.


I have obviously missed something, can someone please tell me how to remove this field from my registration process?

Thanks for any tips on this one.

Dave

3
patagon
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/7 23:15

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


I would also like to know this. I saw an option somewhere (in the latest release, that I cant find now that I understood allowed me as webmaster to use only one (i.e. login name is the same as display name, so no need for display name). is this possible?

4
blindman
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/7 23:57

  • blindman

  • Not too shy to talk

  • Posts: 119

  • Since: 2005/6/26


I don't know if you can remove it but you could set that field to be invisible for some groups and not displaied in registration page. I think is the same as you remove it, for the registered users or another groups.
Don't follow me. I'm lost too.

5
dickinsd
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/8 9:54

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Ok,

I would settle for that, but how do I do it?

So far I have been unable to identify an option to hide this field?

Thanks

Dave

6
blindman
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/8 10:10

  • blindman

  • Not too shy to talk

  • Posts: 119

  • Since: 2005/6/26


I think you are right. I did this for ICQ and other fields, but the display name cannot be set hidden at admin>>modules>>Extended profile>>fields.
Don't follow me. I'm lost too.

7
baraxas
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/12 14:30

  • baraxas

  • Just popping in

  • Posts: 12

  • Since: 2005/3/28


I'm on this too... What about setting uname=loginname?

8
baraxas
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/13 22:23

  • baraxas

  • Just popping in

  • Posts: 12

  • Since: 2005/3/28


Ok, I found something that seems to work. In profiles/register.php found this lines:

if ($op != "register") {
    
$newuser->setVar('uname', isset($_POST['uname']) ? trim($_POST['uname']) : '');
    
$newuser->setVar('loginname', isset($_POST['loginname']) ? trim($_POST['loginname']) : '');
    
$newuser->setVar('email', isset($_POST['email']) ? trim($_POST['email']) : '');


and modify this way:

if ($op != "register") {
    
$newuser->setVar('uname', isset($_POST['loginname']) ? trim($_POST['loginname']) : '');
    
$newuser->setVar('loginname', isset($_POST['loginname']) ? trim($_POST['loginname']) : '');
    
$newuser->setVar('email', isset($_POST['email']) ? trim($_POST['email']) : '');


Then open profiles/include/forms.php and comment the following lines:

$elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME"uname"$uname_size75$user->getVar('uname''e')), 'required' => true);
$weights[0][] = 0;


and

$elements[0][] = array('element' => new XoopsFormText(_PROFILE_MA_DISPLAYNAME'uname'2575$user->getVar('uname''e')), 'required' => 0);
$weights[0][] = 0;


Hope this help!

9
Bananadude
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/24 8:55

  • Bananadude

  • Not too shy to talk

  • Posts: 155

  • Since: 2005/9/16


Thanks baraxas
It was exactly what I was looking for and it works perfect!
Wonder whats the point with seperate username and loginname.
--- censored by Bananadude ---

10
Bananadude
Re: Can I remove Displayname from user registration (xoops 2.2.3)
  • 2005/11/28 20:13

  • Bananadude

  • Not too shy to talk

  • Posts: 155

  • Since: 2005/9/16


Works *almost* perfect.
If you choose du Edit your Account you will get the errormessage "Displayname is too short. It must be more than 2 characters." no matter what you try to Edit.


Find these lines in your modules/profile/edituser.php
$edituser->setVar('name'$myts->stripSlashesGPC(trim($_POST['name'])));
$edituser->setVar('uname'$myts->stripSlashesGPC(trim($_POST['[b]uname[/b]'])));


and change it to
$edituser->setVar('name'$myts->stripSlashesGPC(trim($_POST['name'])));
$edituser->setVar('uname'$myts->stripSlashesGPC(trim($_POST['[b]loginname[/b]'])));


Then find
$avatar->setVar('avatar_file'$uploader->getSavedFileName());
$avatar->setVar('avatar_name'$xoopsUser->getVar('[b]uname[/b]'));
$avatar->setVar('avatar_mimetype'$uploader->getMediaType());


and change it to
$avatar->setVar('avatar_file'$uploader->getSavedFileName());
$avatar->setVar('avatar_name'$xoopsUser->getVar('[b]loginname[/b]'));
$avatar->setVar('avatar_mimetype'$uploader->getMediaType());


Best Regards,
Bananadude
--- censored by Bananadude ---

Login

Who's Online

239 user(s) are online (194 user(s) are browsing Support Forums)


Members: 0


Guests: 239


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