Jump to content

Get Client_Id Value In Client_Main_Custom_Fields.pdt


serge

Recommended Posts

 

you need it without hacking the core file ?

$vars->id

 

This is the user ID. The client ID would be available with:

$vars->client_id

However, the content of $vars changes based on post data. For example, if there was an error on the page, the page would be shown again and $vars would not contain the client ID any longer.

Link to comment
Share on other sites

Thank You, both solutions worked fine, and it's echo same value I wanted/needed.

 

by the way I'm confused by the sense of user_id VS customer_id, what's the difference?

 

Do there is connection with contact(s) vs customer, so when there is only one contact for the customer both id match?

Link to comment
Share on other sites

The user ID and client ID reference different tables in the database and represent different records. While it's possible the user ID and client ID can be the same for some users, it is not reliable to assume this to be the case. You should reference the correct ID for what you're trying to do.

 

user ID = user login information

client ID = client information

 

Every client has a user, but not every user is a client.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...