Foren / Cotonti / Extensions / [Release] Custom account validation framework

Allow for custom account validation, eg. for paid subscriptions or invite-based registration

GHengeveld
#1 28. Februar 2010, 09:43
I'm working on a subscription-based webservice using Cotonti. For this I needed a way to automate account validation upon succesful payment by the customer/user. I decided to replace the default account validation, which is based on the user_lostpass key, by my own system, using a seperate validation key (lostpass key is not secure since a user can request it through the passrecover plugin).

Note that this is a framework for writing your own validation script. By default this plugin will just auto-validate (skipping the default admin or email validation). You should make the necessary changes in accountvalidation.php (see the comments there for details).

In order for this plugin to work you will need an extra hook in system/core/users/users.register.inc.php:
/* === Hook for the plugins === */
$extp = sed_getextplugins('users.register.validate.first');
if (is_array($extp))
{ foreach ($extp as $pl) { include_once($cfg['plugins_dir'].'/'.$pl['pl_code'].'/'.$pl['pl_file'].'.php'); } }
/* ===== */

Put it right below the following line (somewhere around 235):
elseif ($a=='validate' && mb_strlen($v)==32)
{
Or you can just download the updated file here.

Download the plugin here.

Please provide feedback or any bugs you may encounter.
esclkm
#2 28. Februar 2010, 16:39
are you back :)))) ?
littledev.ru - мой маленький зарождающийся блог о котонти.
снижение стоимости программирования и снижение стоимости производства разные вещи. Первое можно скорее сравнить с раздачей работникам дешевых инструментов, чем со снижением зарплаты
GHengeveld
#3 28. Februar 2010, 20:13
Only a little. ;-) I'm working on a project for a client which is based on Cotonti. At first I developed this for the project, but then I found not needing it, so I release it.