Question to subscription form

  • Sven Kutz
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #141861 by Sven Kutz
Replied by Sven Kutz on topic Question to subscription form
Hi Tuan,

Many thanks for your support so far. I have now come across another question.

Is it possible to create a hidden field within the registration form which prepopulates Joomla user id of the logged in user? It would be important that this field is either hidden or readonly so it is not to be changed.

I would like to save the user ID of the logged in user within the plan details.

Many thanks and best wished from Germany!

Sven

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 6 months ago #141863 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Question to subscription form
Hi Sven

No, it is not possible, Membership Pro does not support that. However, it is already store ID of the logged in user for each subscription record (in user_id field in #__osmembership_subscribers table)

Not sure why you want that in a custom field?

Tuan

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

  • Sven Kutz
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #141978 by Sven Kutz
Replied by Sven Kutz on topic Question to subscription form

Tuan Pham Ngoc wrote: Hi Sven

No, it is not possible, Membership Pro does not support that. However, it is already store ID of the logged in user for each subscription record (in user_id field in #__osmembership_subscribers table)

Not sure why you want that in a custom field?

Tuan

Hello Tuan,

thanks for your response. That's interesting to read.

So in case any user is logged in on my site via standard Joomla login plugin and this user would subscribe any plan, then the Joomla user ID of the specific logged in user would be saved in #_osmembership_subscribers table together with plan details the user subscribed?

Could you please confirm if I have understood this correct?

That would then meet my requirements and would be very useful for me. In that case my question regarding a hidden field is not required for me anymore.

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
4 years 6 months ago #141981 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Question to subscription form
Hello Sven

Yes, that's right. The user_id field in #__osmembership_subscribers will always keep the Joomla User ID of the user who subscribes for the plan:

- In case users logged in, their user id of course will be stored in that field
- In case user registers for a new account, the ID of the created user account will also be stored there

So in short, no need for a hidden field

Tuan

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