Forum
Set member tag expire date
Hi, How can I set an expire date for a membership tag at registration? I can set the Tag from the form in the admin but not the expire date.
Hi, How can I set an expire date for a membership tag at registration? I can set the Tag from the form in the admin but not the expire date.
Thanks I have seen that in the docs but how can I set this at registration? For example I have my registration form. I was thinking I could set up hidden form fields that would set a tag and it's expire date when the user registers.
I set the registration form in my template with this..
Then my registration form here register.html...
Where/how would I use this
so that it is set when the user registers?
Thanks.
Place this code in a block of code which checks a member being logged in. You could add a tag at registration then check for that tag on login and add the new tag at that point.
You can't add a tag with expiration at registration so you'll have to check for another then add if missing.
Does the expire date get reset every time the user logs in? Or does it first check to see if the user has the tag and if he does then skip it?
No. It does not reset. If it already exists nothing will happen. When expired you have to delete to reset.
OK I get it. Thanks!
I'm amusing that if a tag has expired then it treats is as if it is not there, correct? So if I check to see if the tag is not there this should be true. In my test the tag has expired but this check does not work. the result does not display "test tag expired"
What if you log out and back in?
I tried that also and I still get the same result.
Its working now. I did not realize the time is also set on the expire date. It expired today but not till later today. I changed the time in the database to test and all is good. Thanks.