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

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

Re: [Tom P] Account Expires field is not working ??

By kovali - December 28, 2011

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.

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

Hi,

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

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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