cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

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

RM12
13-Aquamarine

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

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??

1 ACCEPTED SOLUTION

Accepted Solutions
mnarang
17-Peridot
(To:RM12)

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. 

View solution in original post

4 REPLIES 4
mnarang
17-Peridot
(To:RM12)

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.

RM12
13-Aquamarine
(To:mnarang)

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 ??

mnarang
17-Peridot
(To:RM12)

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. 

slangley
23-Emerald II
(To:RM12)

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

Top Tags