Jump to content

Get Client_Id Value In Client_Main_Custom_Fields.pdt


Recommended Posts

Posted
  On 9/5/2015 at 9:56 PM, naja7host said:

 

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.

Posted

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?

Posted

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...