validation of subscription expiration

  • Aathman
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #149008 by Aathman
validation of subscription expiration was created by Aathman
Hi! I need assistance creating an override in a third part form. Essentially users can pick a date on a reservation calendar and save the from, but if their subscription expires before the date they have selected, I will show an error.

Can you assist with the PHP (or Javascript) values and code to get the user's subscription expiration date?
 

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

More
2 years 3 months ago #149013 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic validation of subscription expiration
Hi

I could not help with the code. Somehow, you will have to handle it yourself because I don't know what plan you will get the expiration date from (note that one subscriber can subscribe for multiple plans, thus having different expiration date)

To check the expiration date of users, you will need to get data from to_date field in #__osmembership_subscribers table of that user. Please note that you should only get data from records which has published = 1 and user_id = ID_OF_CURRENT_USER

Hope it gives you some clues

Tuan

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