Account Expires field is not working ??

6 posts by 3 authors in: Forums > CMS Builder
Last Post: December 29, 2011   (RSS)

By kovali - December 28, 2011


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 :-)

Re: [kovali] Account Expires field is not working ??

By (Deleted User) - December 28, 2011

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,


Re: [kovali] Account Expires field is not working ??

By kovali - December 29, 2011

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

Re: [kovali] Account Expires field is not working ??

By kovali - December 29, 2011

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!

Re: [kovali] Account Expires field is not working ??

By Jason - December 29, 2011


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

Jason Sauchuk - Project Manager

Hire me! Save time by getting our experts to help with your project.