How to get user's info stored in custom fields

Discussion in 'aMember Pro v.4' started by richard_vencu, Dec 14, 2012.

  1. richard_vencu

    richard_vencu New Member

    Joined:
    Nov 25, 2012
    Messages:
    25
    I need to add some custom info in my invoices. Some info are stored as custom fields for users

    Please advise what function to use (or to create?) given the active $user and the name of the custom field (such as 'company_name')
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    If that is an SQL field (recommended) :
    PHP:
    $user->company_name
    If that is non-SQL field:
    PHP:
    $user->data()->get('company_name')

Share This Page