I kind of broke my site with this, and was wondering if anyone knows what to do.
I have installed Ion_Auth into my site to replace a simple login I made from a tutorial video. The install worked and I began the process of converting the site to use Ion_Auth, so teacher/student and admin pages are protected by groups now, and logging in works from [http://localhost/example/auth/login]
The problem comes from trying to make logging in from the site main page instead of auth/login page. When I try to load the auth/login view into site.php, it gives me these error messages when I access the site:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: message
Filename: auth/login.php
Line Number: 7
Email/Username:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: identity
Filename: auth/login.php
Line Number: 13
Password:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: password
Filename: auth/login.php
Line Number: 18
My front page is created by site.php, and auth.php is a separate controller. I tried copy/pasting auth.php into site.php, but that didn’t seem to work. (My logic being that everything should be defined auth.php) I am still fairly new to codeigniter and therefore this may just be some n00bish mistake I’m overlooking.
======================================================================================
EDIT: Ok, I solved the problem, it was indeed a simple n00bish mistake.
I had simply forgot to route the form in my login_view properly. My old form_open linked to admin.php which handled the login process, but I only changed it to form_open(‘auth’) instead of form_open(‘auth/login’). I figured I would leave this post here for any others that get stuck by anything similar.