Jump to content
  • 0

Get Userid From Within A Module That Extends Module


Question

Posted

I'm trying to grab the user's email using Contacts::get() but I'm not sure how to get the user's client id so I can pass it through.

 

Any idea?

 

Thanks,

 

Andrew

 

Edit:

 

Found that you can use $_SESSION['blesta_client_id'] but is there a better way of doing this?

2 answers to this question

Recommended Posts

  • 0
Posted

The client ID is available to some of the module methods as apart of input or service data. You should use that rather than the session, as there may not be any session user data available when the module is called automatically or by an admin.

Join the conversation

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

Guest
Answer this question...

×   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...