ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Equivalent to {member_id} variable in forums

August 19, 2008 5:58pm

Subscribe [2]
  • #1 / Aug 19, 2008 5:58pm

    Brandon Jackson

    4 posts

    I am trying to add custom profile field editing functionality to the forum’s edit profile form in the user control panel (path is forums/member/edit_profile).

    It’s my understanding that there is no way to access the custom profile fields except using an sql query to get the data manually. I need a way to get the member id of the current user so that I can find their information in the database. Normally, the {member_id} variable could be used, but that doesn’t seem to work in the forums.

    How can I find out the member id of the current user? Or is there a better way to edit custom profile fields?

    Thanks!
    Brandon

  • #2 / Aug 19, 2008 9:20pm

    Sue Crocker

    26054 posts

    Welcome to the EE forums, Brandon

    EEWiki:// Using Session Variables via PHP

    You can set up the forums to use PHP in templates.

    This bit is just to get you started in finding a full answer.

  • #3 / Aug 20, 2008 8:18pm

    Brandon Jackson

    4 posts

    Thanks! I never would have found that on my own. I had to enable PHP in the templates in output mode in order for it to work. But it’s working. Thanks again.
    -Brandon

  • #4 / Aug 20, 2008 8:20pm

    Sue Crocker

    26054 posts

    Excellent, Brandon! Glad you got it working. I’m going to close this thread, but don’t hesitate to open a new one if needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases