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.

PHP and current member's custom field

June 19, 2011 3:42pm

Subscribe [2]
  • #1 / Jun 19, 2011 3:42pm

    funnEE

    94 posts

    Using PHP, I would like to get a custom member field of the currently logged in member.

    I would like to do something like this.

    $this->EE->session->userdata ['custom_member_field'];

      Where custom_member_field is the name of the custom member field.

    I notice in the user guide doc that custom fields are not part of the session class.

    How could I go about doing this?
    Thanks

    UPDATE:
    I think the answer can be found here.  This may also help using a 3rd party plug-in.

  • #2 / Jun 19, 2011 5:47pm

    Mark Bowen

    12637 posts

    Do you have to use PHP? I only ask as there is a Custom Profile Data Tag which can bring back this information for you should you need it.

    Failing that you would need to use a custom SQL query to get the information you need here.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / Jun 19, 2011 6:14pm

    funnEE

    94 posts

    Thanks

  • #4 / Jun 20, 2011 8:56am

    Sue Crocker

    26054 posts

    Thanks for the assist, Mark.

    Senor Dave - If anything else comes up, please do let us know in a new thread..

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

ExpressionEngine News!

#eecms, #events, #releases