... Elxis version 2009.1 codename Hecate is out, download it from Elxis Download Cender (EDC) ...

Account expiration control

From Elxis Official Documentation

Jump to: navigation, search

Contents

Users accounts now expires!

Since version 2009.0 all users registered to an Elxis web site have an expiration date. By default user accounts never expires but you can easily change this for any user you wish. When adding/editing a user, to change the expiration date click the button next to the expiration date field. Elxis calendar will appear and you can pick any date you wish as the user's expiration date (valid years are between 1960 and 2059). If you wish an account to have no expiration date (never expires) click on the green Never button.

Super administrators account never expires.


Subscriptional content

So you want to provide subscriptional content ah? No problem! Elxis has build-in support for user subscriptions as you can set the account expiration date for any user to any date you wish. You can set up this system in 2 ways depending on if you wish the users to get registered by themselves or you will be the one that you will register them. There is also a third method but requires extra software.

1st method: Users get registered by themselves

When someone gets registered to an Elxis web site he becomes a member of the Registered user group. As the user automatically gets registered you have to set your subscriptional content access level to an other user group as if you make it accessible to the Registered users then they won't have to subscribe to access that content! So either create a new users group (f.e. Subscribers) or use an existing one. Now you can set your subscribers manually by placing them to the Subscribers user group. Set also an expiration date for their subscription.

2nd method: Users get registered manually

This is the recommended method, especially for inexperienced Elxis administrators as you won't have to deal with user groups. Register the new users manually from within Elxis administration. Set their account expiration date to any valid date you wish. Mail them the login information as well as their expiration date. When they login they will be able to access your subscriptional content (access level: Registered) till the date their account expires.

3rd method: Payment gateway integration

This is the best option but requires extra software. Enable users registration in Elxis global configuration and set that the confirmation for the new user accounts will be done manually. So the users get registered by themselves but they do not get activated and they can not login. The user will have to pay for his/her subscription first. If the payment is successful the payment script changes the user account status to activated, sets the proper expiration date based on the subscription package the user bought, and the user becomes an active subscriber. You can use PayPal or any other payment gateway for this purpose. The payment script is easy to be implemented by any PHP developer.


Cron jobs

Elxis 2009.0 has a special file which checks Elxis database for recently expired user accounts. When it finds such accounts it blocks those users and sends them a notification e-mail to renew their account by contacting the web site administrator. You can automatise this task by placing this special file in a CRON job. Set this CRON to be executed once or twice per day. Consider your web hosting provider on how to set up this cron job.

You will find this special Elxis file inside the includes folder:
includes/subcron.php

This script works independently from Elxis CMS (standalone). It loads automatically ADOdb and the Elxis configuration file, gets connected to the Elxis database and executes some queries. The script does not accepts any user input and it is absolutely safe. In case it can not get connected to the database it sends an e-mail notification to the web site administrator. The script does not get executed if the web site is offline.

You can also run manually the CRON file by visiting it with your browser. For example: http://www.mysite.com/includes/subcron.php
Personal tools