Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Account Expires field is not working ??

 

 


kovali
User

Dec 28, 2011, 9:47 AM

Post #1 of 6 (768 views)
Shortcut
Account Expires field is not working ?? Can't Post

Hi,

I have setup a CMSB website with the website membership and e-mail on approved plugin, everything is working fine with members signing up and they get their login password after they have been approved. However, all membership accounts should automatically expire after 30 days, this is were I have this problem:

In admin, I select the date that a new user account should expire (ie. 30 days after registration) and I deselect the checkbox - Never Expires / Ignore Account Expiry (account never expires) - , this should stop the member from logging in to the website after 30 days... but it doesnīt, they can still login after the date that I put in the Account Expires field.

I never had to make use of the Account Expires field in other CMSB websites before so I donīt have much experience with it...

Can someone help me with this please, what could be wrong here ?? Thanks in advance !!

Happy holidays :-)


Tom P
User


Dec 28, 2011, 11:51 AM

Post #2 of 6 (754 views)
Shortcut
Re: [kovali] Account Expires field is not working ?? [In reply to] Can't Post

Hi Kovali,

A quick test to make sure everything is alright would be to create a brand new account and set the expiry to yesterday (for example) and then try logging in.

If it allows you to log in (and you've definitely un-checked "Ignore Account Expiry (account never expires)") then we'll need to take a look at that.

Conversely, if the account does show as expired then it becomes a case of trial and error to find the cause!

Hope this helps,

Tom


kovali
User

Dec 28, 2011, 12:22 PM

Post #3 of 6 (749 views)
Shortcut
Re: [Tom P] Account Expires field is not working ?? [In reply to] Can't Post

Hi Tom,

Thx for the reply, I did some tests and found out that when I set the expiry to yesterday I get the expired message allright when trying to login into the CMS Admin Login Page, but on the other hand I can still login into the actual website front-end, page: user-login.php, and get access to the membership pages/files... Did I forget something here ?? Is there a way to have the expired message show up on the actual website pages (like in the CMS Login) because thatīs what is most important to me now ofcourse.

Thx for your help.


kovali
User

Dec 29, 2011, 12:03 AM

Post #4 of 6 (736 views)
Shortcut
Re: [kovali] Account Expires field is not working ?? [In reply to] Can't Post

it looks like the Approved checkbox overrides the Account Expires field...


kovali
User

Dec 29, 2011, 4:43 AM

Post #5 of 6 (728 views)
Shortcut
Re: [kovali] Account Expires field is not working ?? [In reply to] Can't Post

Problem solved!

In websiteMembership.php I had to uncomment line 82, like this:

// error checking - logoff expired and disabled users
if (@$user['disabled']) { alert(t("Your account has been disabled.")); }
if (@$user['isExpired']) { alert(t("Your account has expired.")); } // future: maybe we should add an expires url where user gets redirect when their account has expired? For subscription renewal

Now I finaly get the "Your account has expired" message when the expiry date has been reached...

Happy Newyear everyone!


Jason
Staff / Moderator


Dec 29, 2011, 11:59 AM

Post #6 of 6 (717 views)
Shortcut
Re: [kovali] Account Expires field is not working ?? [In reply to] Can't Post

Hi,

Glad to hear that everything is working correctly now. Please let us know if you need anything else.

Thanks,
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/