Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 10:41 am EDT

Geeklog Forums

Additional User Profile Fields


Status: offline

JRGilliam

Forum User
Newbie
Registered: 11/11/06
Posts: 8
I've scoured the GL site, including the forums, trying to find information about how to add additional fields to the user profile, all to no avail.

I thought the Custom Registration process might do the trick, but I don't want new users to fill in extra fields just to register -- user name and Email is enough to ask.

However, I do want them, once they've joined and received their PW, to have extra fields in the profile for things like company name, city, state.

Is there a plugin for this? If so, where would I find it? Seems I saw a post from Dirk saying one existed.

If there isn't a plugin, how proficient in PHP must I be to make this happen (I'm a true novice)? What files, besides the templates, would need to be edited?

And if all else fails, hopefully Blaine will see this message: how can I hire you to help me with this, as I think from what I've read thus far, you might be just the person who could do it?

Thanks!
_____________
JR Gilliam
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Custom registration does both. Read lib-custom.php more closely. These functions handle fields displayed to the user:

function CUSTOM_userDisplay($uid)
function CUSTOM_userEdit($uid)
function CUSTOM_userSave($uid)
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
There's also a bunch of plugin API functions that let a plugin add entries to a user's profile. Search lib-plugins.php for functions starting with "PLG_profile".

bye, Dirk
 Quote

Status: offline

JRGilliam

Forum User
Newbie
Registered: 11/11/06
Posts: 8
Thank you both for the feedback -- I truly appreciate it!

But did I mention that I was a PHP novice?

I have no idea how to use the feedback you've given me, but I'll at least read through both the lib-custom.php and lib-plugins.php files you mentioned, and pull out my PHP manual, to see if anything makes sense to me.

It occurred to me though, that perhaps I COULD use the custom registration, but only add fields to the profile form, not to the registration process itself. Is that possible?

At any rate, the probability is high that I'll pose another question soon, though! Thanks again!
____________
JR Gilliam
 Quote

Status: offline

JRGilliam

Forum User
Newbie
Registered: 11/11/06
Posts: 8
OK -- I've analyzed the files and functions you suggested, and here's where things stand now...

I implemented Blaine's custom registration example SUCCESSFULLY with what I believe is only one glitch, but I don't know how to fix it.

The custom user profile fields appear everywhere they're supposed to -- and only the ones I want show up upon new user registration -- however, users already in the db are not able to update their profile by adding info to the new fields.

The admin, however, CAN edit the records and add data to at least one of the new fields -- fullname-- which is the only custom field displayed on when the admin edits a user's profile.

However, the minute an existing user (including the admin) attempts to update their own record, upon submit, no data gets posted to the db, nothing is displayed in the custom fields. In fact, the fullname field actually empties upon submit.

Any suggestions about where I should look for the culprit? It seems like it's the function custom_useredit when called from usersettings.php that's the problem, but I'm not sure how to resolve.

Thanks for the help thus far -- a little more will get me where I need to go! I anxiously await...
_____________________
JR Gilliam
 Quote

Status: offline

JRGilliam

Forum User
Newbie
Registered: 11/11/06
Posts: 8
I'm still hopeful that I'll get some additional help/feedback regarding my problem with the custom registration example provided by Blaine.

Can someone at least tell me this: in addition to following Blaine's instructions, do I need to also edit the users.php and the usersettings.php files to get this example to work?

Again, I thought I had the code implemented correctly, but when users update their profiles, no data gets written to the database.

Ever hopeful someone will offer some meaningful assistance for this PHP novice. Thanks again.
__________________
JR Gilliam
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The custom registration, as the name suggests, only provides hooks so that you can write your own registration forms. It has nothing to do with the display of the user profile. For that, you would need the plugin API functions I mentioned above.

bye, Dirk
 Quote

All times are EDT. The time is now 10:41 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content