CodeIgniter Forums

Full Version: ion auth login error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
hi there!
i'm using ion auth for my project but whenever i try to login i got this error :
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: message
Filename: auth/login.php
Line Number: 37

same error for email and password....and this only happens when i load multiple views for template and main content
have stuck in this for hours, can someone pls help??

thanks!

El Forum

[eluser]NotDior[/eluser]
Can you paste some of your code?

If I'm not mistaken ION_auth makes use of sessions for it's messaging so make sure you are loading sessions.

El Forum

[eluser]ZaLiTHkA[/eluser]
[quote author="dannie_manji" date="1346333660"]hi there!
i'm using ion auth for my project but whenever i try to login i got this error :
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: message
Filename: auth/login.php
Line Number: 37

same error for email and password....and this only happens when i load multiple views for template and main content
have stuck in this for hours, can someone pls help??

thanks![/quote]

If your view (for example, login.php) tries to use the variable $message, make sure the controller that's loading it has this (or at least your version of it):
Code:
$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');

$this->load->view('your_view', $this->data);

Hope that helps a bit. Smile