mespeche,
il y a 13 ans
Salut à toi,
Très facile à mettre en place, comme ceci :
$this->loadModel('Table2');
$user = $this->Table2->find('first', array(
'conditions' => array('Table2.username' => $username, 'Table2.password' => $password)
));
if (!empty($user)) {
$this->User->id = $user'Table2']'id'];
$this->Auth->login($user'Table2']);
}