Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

A few User Field questions

Asked Modified Viewed 3,846 times
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Newbie

Solved:[size=12]First, and probably the most important, I can't seem to find where, for the "Edit Profile" page, editing of the username exists. I would like to disable the ability to change it for all except the Super Administrator, or even completely remove it, as I can simply directly edit the database to change it. Whether this is done by making the input field hidden, removing the input field, or replacing the input textbox with text of the users name.[/size]

Second, is it possible to have more than one field in a "User Field" file set?
For example, my current project is a site for a game, I would like to include: Character name, Level, Class, and Guild, all in one user field, but looking at the current system, I'm not sure if it is possible to just simply add more database entries into the *_include_var.php
EDIT: I know there is the option to use the Serialize function, but I'd rather not do that, for complications when adding more than one character.

Solved: [size=12]Lastly, and this isn't exactly a user field question, but it's relating to a user field, I am trying to make the User's Avatar photo appear on the User Panel, and if they do not have an Avatar set, for a no avatar image to appear. This is the code I have so far. It does not display the avatar image, but will instead always display the no-avatar image.[/size]

2/3 Problems now solved. Thanks to all that helped so far.

Any help is much appreciated. I am really only beginning with PHP coding, and my current ability is only altering what already exists, rather than creating new code.
Edited by FallFromINFINITY on 21-10-2011 21:14,
0 replies

6 posts

S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

Quote

First, and probably the most important, I can't seem to find where, for the "Edit Profile" page, editing of the username exists. I would like to disable the ability to change it for all except the Super Administrator, or even completely remove it...

- well, that option is allready inbuilt in V7.02.XX

Log on to your site and go to: Admin Panel => Settings => User Management - look for the option "Allow users to change user name?".
0 replies
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Newbie

Quote

smokeman wrote:

Quote

First, and probably the most important, I can't seem to find where, for the "Edit Profile" page, editing of the username exists. I would like to disable the ability to change it for all except the Super Administrator, or even completely remove it...

- well, that option is allready inbuilt in V7.02.XX

Log on to your site and go to: Admin Panel => Settings => User Management - look for the option "Allow users to change user name?".

Oh, stupid me. I kept searching through User Fields and the various files that make up the edit profile page. Okay, one problem down. Thanks.
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

file_exists($userData['user_avatar']) <<< wrong

file_exists(IMAGES."avatars/".$userData['user_avatar']) <<< correct

You forgot about images folder.
0 replies
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Newbie

Quote

PolarFox wrote:

file_exists($userData['user_avatar']) <<< wrong

file_exists(IMAGES."avatars/".$userData['user_avatar']) <<< correct

You forgot about images folder.

Fixed that, but still showing the no avatar image on an account with an avatar.

Removing the if/else, and just testing the actual line to see if it displays an image:
echo "<img src='".IMAGES."avatars/".$userData['user_avatar']."' class='avatar' alt='".$locale['u062']."' title='".$locale['u062']."' /><br />\n";
there is no image at all.
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

if it's for userfields, try to use

$this->userData['user_avatar']
0 replies
F
FallFromINFINITY
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Newbie

Quote

PolarFox wrote:

if it's for userfields, try to use

$this->userData['user_avatar']

Problems solved. I found an inconsistency when looking at the rest of the file. All other user information on the panel was called using $userdata[] (note the lowercase "d"wink, while although working code copied directly, $userData[], was not producing results. I'm not exactly sure why this is case sensitive, when both instances work in alternate places, but that was the problem. Upon changing the case, the desired results were immediate.

Thanks for the help.
2/3 problems now solved.
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
F
F
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet