GUIDE: ezAuth with codeIgniter 2.1.0

ezAuth  is a very handy library for user authentication/authorization. However it has not been updated lately to be compatible with the latest changes in CodeIgniter 2.1.0

I assume that you’ve successfully added it to your CodeIgniter project. For me all I did is that I copied ezauth_model.php to the models folder  and loaded the model in my controllers.

In this new guide, I will list all the changes that you need to do to get it working with you from the first shoot! The following changes need to be done on the ezauth_model.php

  1. change:
    class EzAuth_Model extends Model
    class EzAuth_Model extends CI_Model
  2. Update the constructor name to become
    function __construct() {
    Instead of the class name
  3. Add the following line toward the end of your constructor
  4. Make sure that the cookie helper is loaded in your autoload.php file or add it to the constructor
  5. Replace the db function “getwhere” with “get_where”

You’re done! good luck

1 thought on “GUIDE: ezAuth with codeIgniter 2.1.0

  1. recent

    hi, i try to use de eazauth_demo, i download it and copy the folder under wampserver, i follow the step in README -FIRST.txt in the eazauth_demo folder, when i try :htt//:localhost/ezauth_demo/ i see anything when i delete .htaccess file, the index file shown with some error, can you help ho to use the it in wamp

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: