emreakay / CodeIgniter-Aauth

Authorization, Authentication and User Management library for Codeigniter 2.x and 3.x to make easy user management and permission operations
http://emreakay.com
GNU Lesser General Public License v3.0
393 stars 235 forks source link

Conflicts while using CI migrations #251

Closed jfdelarosa closed 4 years ago

jfdelarosa commented 4 years ago

Basically you can't load a controller who's is using the migration library if you have previously loaded (locally or globally) Aauth.

If you do that, it will crash with this error on screen:

A PHP Error was encountered Severity: Notice

Message: Trying to get property 'dbdriver' of non-object

Filename: core/Loader.php

Line Number: 454

Backtrace:

File: /application/controllers/admin/Update.php Line: 6 Function: library

File: /index.php Line: 315 Function: require_once

Digging around, I found out that it changes your instance of $CI->db to NULL and $CI->aauth->aauth_db is what you expect $CI->db to be.

I'm using CI 3.1.11

REJack commented 4 years ago

Aauth only delivers Migrations in v3-dev branch, if you use the actual v3-dev branch files then it will not work in CI3 it will work only with CI4.