Skip to main content
14-Alexandrite
April 29, 2021
Solved

how to restrict user while login whenever user subscription expired??

  • April 29, 2021
  • 2 replies
  • 2296 views

Hello,

          I create subscription for user ex. for 1 months after 1 month user subscription is expired. for this ,I write JavaScript code .I also create one login page by using organization .I want to restrict user while login when user subscription is expired . I'll refer this  Post  but not getting any solution. please refer below attachment and suggest Is  there any way to restrict user while login ?? if Yes then How do I  restrict??

Best answer by mnarang

In your JS code where you are marking that subscription as expired, you can execute DeleteMemeber service on the organization. like if (subscription==expired) {Organizaotions["TestOrg"].DeleteMember({name:"username",member:undefined,type:"user" )}}
I believe if the user is removed from the Org, he will not be able to login into Organization Form Login. You can test the above service, I just typed it without testing. Let me know if this does not suit your use or if it does not work for you. 

2 replies

5-Regular Member
April 29, 2021

Can't you just delete the user from that organization using the DeleteMember service, if you want to restrict that user access in that organization FormLogin? Once you expire that subscription after 1 month immediately, you can do it. I am not sure how your logic is designed but let me know if I understood your query in the wrong fashion.

RM1214-AlexandriteAuthor
14-Alexandrite
April 30, 2021

Thanks for your reply , Yes I  want to restrict that user access in that organization Form Login. After 1 month subscription is expired ,immediately want to restrict  user access in that organization Form Login .plzz suggest How do I restrict that user ??

mnarang5-Regular MemberAnswer
5-Regular Member
May 1, 2021

In your JS code where you are marking that subscription as expired, you can execute DeleteMemeber service on the organization. like if (subscription==expired) {Organizaotions["TestOrg"].DeleteMember({name:"username",member:undefined,type:"user" )}}
I believe if the user is removed from the Org, he will not be able to login into Organization Form Login. You can test the above service, I just typed it without testing. Let me know if this does not suit your use or if it does not work for you. 

Support
May 10, 2021

Hi @RM12.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon