Reply to comment

How many steps are there in a simple user registration and login?

We all take it for granted that most sites will have a user registration system, and way to log in. We're used to it, and most people are unaware of how complex it is.

So, how complex is it?

It's around 15 different steps or screens.


I've done it a dozen times, and I think that's about right.

I'm learning the Slim PHP framework, and needed to do the auth parts. There is some existing middleware to do auth, and even one that uses a db backend (but it brings in ZF2... so I'm not inclined to use it). There doesn't seem to be a canned solution with all the screens and emailer.

I turned to Django, which has a good user reg system that has password changing and resetting. It's extended by the django-registration-redux package, which adds email activation.

Here's a snippet of some work in progress. It's not functional or even correct, but just look at the URLs:

$app->get('/login',                   '\Reg\Controllers\Main::login'     )->name('reg/login');
$app->get('/logout',                  '\Reg\Controllers\Main::logout'    );
$app->get('/password/change',         '\Reg\Controllers\Password::change');
$app->get('/password/change/done',    '\Reg\Controllers\Password::done'  );
$app->get('/password/reset',          '\Reg\Controllers\Reset::reset'    );
$app->get('/password/reset/:key',     '\Reg\Controllers\Reset::reset'    );
$app->get('/password/reset/complete', '\Reg\Controllers\Reset::complete' );
$app->get('/password/reset/done',     '\Reg\Controllers\Reset::done'     );
$app->get('/activate/:key',           '\Reg\Controllers\Reset::done'     );
$app->get('/activate/complete',       '\Reg\Controllers\Reset::done'     );
$app->get('/register',                '\Reg\Controllers\Reset::done'     );
$app->get('/register/complete',       '\Reg\Controllers\Reset::done'     );
$app->get('/register/closed',         '\Reg\Controllers\Reset::done'     );

Yes, that looks about right.

It's going to take a couple days to write this.

I'll use Twig now. This way, I can reuse the Django templates I've copied and adapted recently.

I'll bring in PHPMailer, which is nice.


The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options

10 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.