This is my code:
function beforeFilter()
{
$this->Auth->allow
( 'ajax_combo_subjects_by_area',
'ajax_combo_courses_by_year',
'ajax_combo_skills_by_year',
'search_skills_courses',
'search_areas_subjects',
'contact_thank_you',
'contact_teacher',
'reset_password',
'view_profile',
'activate',
'register',
'search',
'home'
);
$this->Auth->fields = array
(
'username' => 'email',
'password' => 'password'
);
$this->Auth->loginRedirect = array
( 'controller' => 'Teachers',
'action' => 'login_ok'
);
}
function login_ok()
{
if ($this->Auth->user('is_admin') == 1 )
{
$this->redirect('admin');
}
else
{
$this->redirect('edit_profile');
}
}
Why is it that this works in FireFox but in IE6, the login does not work.
It just redirects to the default page /users/login, instead of
/teachers/admin or /teachers/edit_profile.
My users controller is this:
<?php
class UsersController extends AppController
{
var $components = array('Auth');
function beforeFilter()
{
$this->Auth->fields = array
(
'username' => 'email',
'password' => 'password'
);
if(isset($this->Auth))
{
$this->Auth->loginRedirect = array
( 'controller' => 'Teachers',
'action' => 'login_ok'
);
}
}
/**
* The AuthComponent provides the needed functionality
* for login, so you can leave this function blank.
*/
function login()
{
}
function index()
{
}
function logout()
{
$this->redirect($this->Auth->logout());
}
}
?>
I have the dual controller setup because the Teachers model is the main
object, and the users controller is basically just a place holder for the
users table in the database.
Thank you all in advance for any help you can offer.
<http://www.connaxis.com/> <http://www.connaxis.com/>
<http://www.connaxis.com/> <http://www.connaxis.com/>
<http://www.connaxis.com/> <http://www.connaxis.com/> David Kenneth Coleman
Software Developer
…………………………………………………………………………………………………………………
United States: +
1 6468108783 Dept: Development
Argentina:
+ 54 11 52465987 E-mail: <mailto:[email protected]>
[email protected]
The Netherlands: + 31
208080017 Skype: david.k.coleman
¡ <http://www.connaxis.com/> <http://www.connaxis.com/>
<http://www.connaxis.com/> <http://www.connaxis.com/>
<http://www.connaxis.com/> <http://www.connaxis.com/> NEW! Please check out
our new <http://www.creative-outsourcing.com/> Portfolio Website:
<http://www.creative-outsourcing.com/> Connaxis Creative Outsourcing
Specialist <http://www.creative-outsourcing.com/>
www.creative-outsourcing.com
First page position Google.com:
<http://www.google.com/search?hl=en&q=creative+outsourcing&btnG=Google+Searc
h> Creative Outsourcing
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
<<inline: image001.jpg>>
