• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Get Joomla UserID for mapping

Get Joomla UserID for mapping 10 years 7 months ago #29019

I have a simple form, with the Joomla User registration plugin enabled.

This works all fine - when a user submits the form, the user is created in Joomla.

But i need to store information in another database table as well. (ex #__shop_users)
I have tried the mapping-tool in RSForm Pro, and this works fine too!

Now i need to store the Joomla UserID (the index key of #__users for the new user.
The id in #__users needs to be stored in #__shop_users as well for the user created.

But how to i get this id?

Hope that somone can help me with this.
The administrator has disabled public write access.

Get Joomla UserID for mapping 10 years 7 months ago #29027

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
Create a hidden field and in the Default Value field insert this code:

//<code>
$user = JFactory::getUser();
return $user->get('id');
//</code>

Next step would be to map the result in the desired table.
My help is not official customer support. To receive your support, submit a ticket by clicking here
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!