Where is the user ID?

  • Xavi Sanchez
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 11 months ago #81721 by Xavi Sanchez
Where is the user ID? was created by Xavi Sanchez
Hello,
I need to create a button that sends the user ID registered in the store.
What is the variable that contains the user id? How can I pass through a button?
Thank you very much.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #81729 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Where is the user ID?
Hi Xavi

I am not sure how and where you want to create the button? Could you please explain more details ?

Tuan

Please Log in or Create an account to join the conversation.

  • Xavi Sanchez
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 11 months ago #81749 by Xavi Sanchez
Replied by Xavi Sanchez on topic Where is the user ID?
I create the button in the list of my wishlist page and I want to this button send a mail to me with the name of customer and her list of wishlist.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #81758 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Where is the user ID?
Seem this question is not related to our Events Booking extension - maybe it is for our Eshop extension

However, I can say that in general, there is no way to include ID of the user into an HTML button which you created. So I guess you will have to find a different solution

Tuan

Please Log in or Create an account to join the conversation.

  • Xavi Sanchez
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 11 months ago #81764 by Xavi Sanchez
Replied by Xavi Sanchez on topic Where is the user ID?
I find the solution.

JFactory::getUser()->id

This return de id of the customer registered.

Thanks.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #81765 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Where is the user ID?
Ah Yes. That's the PHP code. I thought you want to get user id from HTML code. Sorry

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc