O'Reilly logo

FuelPHP Application Development Blueprints by Sébastien Drouyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Subscription and authentication features

Instead of generating entire scaffolds, we will manually create controllers and views as we won't need most CRUD features.

Implementing the subscription and authentication forms

First, let's create the user controller. Create a file at APPPATH/classes/controller/user.php and set its contents to:

<?php
class Controller_User extends Controller_Template
{

}

The home page, which will be handled by the index action of the User controller, displays the user's posts if the user is logged in, otherwise it will display the subscription and authentication forms.

Since we have no user in our system, nobody can log in. Thus, we will begin the subscription and authentication forms.

First, add the following method in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required