There are four models in this project, which are as follows:
models/password_model.php
: This contains functions that are specific to creating and resetting passwords.models/register_model.php
: This contains functions that are specific to registering a user.models/signin_model.php
: This contains functions that are specific to signing a user into the system.models/users_model.php
: This contains the main bulk of the model functions for this project, specifically CRUD operations to be performed on users and various other admin functions.
So that's an overview of the models for this project; now, let's go and create each model.
Create the /path/to/codeigniter/application/models/password_model.php
file and add the following code to it:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Password_model extends CI_Model { function __construct() { parent::__construct(); }
The does_code_match()
function will check whether the code supplied...