Welcome Guest, Not a member yet? Register   Sign In
CommunityAuth and My_Model
#1

I'm interested in using CommunityAuth, but am trying to figure out how it will integrate with MY_Model (https://github.com/avenirer/CodeIgniter-MY_Model) since CommunityAuth has a similarly named file in the same directory.

Has anyone used both add-ins? IF so, how?

Thank you.
Reply
#2

Community Auth's MY_Model.php currently has:

Properties

  1. $acl
Methods

  1. acl_query
  2. acl_permits
  3. is_role
  4. db_table
Take these properties and methods and put them in your existing MY_Model.php file. That's all you need to do.

Also note, if you're not going to use CodeIgniter's ACL feature, you wouldn't need the $acl property and the first two methods.
Reply
#3

(01-11-2018, 11:22 PM)skunkbad Wrote: Community Auth's MY_Model.php currently has:

Properties

  1. $acl
Methods

  1. acl_query
  2. acl_permits
  3. is_role
  4. db_table
Take these properties and methods and put them in your existing MY_Model.php file. That's all you need to do.

Also note, if you're not going to use CodeIgniter's ACL feature, you wouldn't need the $acl property and the first two methods.

Sounds simple enough. Thanks!!
Reply
#4

(01-12-2018, 07:15 AM)chrismartinez99 Wrote:
(01-11-2018, 11:22 PM)skunkbad Wrote: Community Auth's MY_Model.php currently has:

Properties

  1. $acl
Methods

  1. acl_query
  2. acl_permits
  3. is_role
  4. db_table
Take these properties and methods and put them in your existing MY_Model.php file. That's all you need to do.

Also note, if you're not going to use CodeIgniter's ACL feature, you wouldn't need the $acl property and the first two methods.

Sounds simple enough. Thanks!!

Hi, I'm receiving this error at /examples/create_user:

Code:
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant LOGIN_PAGE - assumed 'LOGIN_PAGE'
Filename: config/routes.php
Line Number: 56
Backtrace:
File: /Users/chrismartinez/www/www.nfinitepursuit.com/public_html/booking/application/config/routes.php
Line: 56
Function: _error_handler
File: /Users/chrismartinez/www/www.nfinitepursuit.com/public_html/booking/index.php
Line: 314
Function: require_once

Any ideas?
Reply
#5

Got that fixed, but now I get this error:

Message: Call to undefined method Examples::is_logged_in()
Filename: /Users/chrismartinez/www/www.nfinitepursuit.com/public_html/booking/application/controllers/Examples.php
Line Number: 201
Reply
#6

Read: https://forum.codeigniter.com/thread-693..._logged_in

Examples controller extends MY_Controller, which should extend Auth_Controller. If this isn't the case, then you need to fix that. So if you already had a MY_Controller, you need to have it extend Auth_Controller. See the MY_Controller that ships with Community Auth for the details.
Reply
#7

Thanks for the help!! I got it working!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB