http://www.cakephpforum.net/index.php?showtopic=1709&st=0&#entry6282
up! --- Wladiston Maurício de Paiva http://wladistonpaiva.com.br [email protected] [email protected] +55 (31) 8435 - 5380 2009/9/16 Wladiston Paiva <[email protected]> > Friend, this table is a new. > the strange thing is that cakephp consulting in firebird works fine(1 query > result), but something happens after the consultation that he loses the > password in $this->data. > > --- > Wladiston Maurício de Paiva > http://wladistonpaiva.com.br > [email protected] > [email protected] > +55 (31) 8435 - 5380 > > > 2009/9/15 Aivaras <[email protected]> > > Didn't you migrate to an existing database? Remember that Security::salt >> does not only use md5 or sha1 but also a Salt that you've filled in your >> core.php >> >> Faifas >> http://www.voveris.eu/ >> >> >> >> On Tue, Sep 15, 2009 at 22:10, Wladiston Paiva <[email protected] >> > wrote: >> >>> Hi guys! >>> I find a problem in auth component. >>> >>> *User Model:* >>> class User extends AppModel { >>> var $name = 'User'; >>> } >>> >>> >>> *Users Controller:* >>> class UsersController extends AppController { >>> var $name = "Users"; >>> var $uses = array('User'); >>> var $components = array('Auth'); >>> >>> function beforeFilter() { >>> parent::debugVar($_POST); >>> parent::beforeFilter(); >>> } >>> >>> function login() { >>> //Auth Magic >>> parent::debugVar($this->data); >>> } >>> >>> function logout() { >>> $this->redirect($this->Auth->logout()); >>> } >>> } >>> >>> >>> *App Controller:* >>> class AppController extends Controller { >>> var $components = array('Auth'); >>> >>> function beforeFilter() { >>> //Security::setHash('md5'); // or sha1 or sha256. >>> //Configure AuthComponent >>> $this->Auth->loginAction = array('controller' => 'users', >>> 'action' => 'login'); >>> $this->Auth->logoutRedirect = array('controller' => 'users', >>> 'action' => 'login'); >>> $this->Auth->loginRedirect = array('controller' => 'usuarios', >>> 'action' => 'add'); >>> } >>> } >>> >>> >>> When I run the debug, the sql is mounted correctly. but it returned the >>> error "Login failed. Invalid username or password." >>> I take the sql generated and run on the bank, and is returned correctly >>> the User. >>> If I print the $ _POST values come correctly, if I print the $ this-> >>> data, the User is correct, but the password is NULL.. >>> >>> >>> *POST:* >>> array(2) { >>> ["_method"]=> >>> string(4) "POST" >>> ["data"]=> >>> array(1) { >>> ["User"]=> >>> array(2) { >>> ["username"]=> >>> string(5) "admin" >>> ["password"]=> >>> string(6) "123456" >>> } >>> } >>> } >>> >>> >>> *this->data:* >>> array(1) { >>> ["User"]=> >>> array(2) { >>> ["username"]=> >>> string(5) "admin" >>> ["password"]=> >>> NULL >>> } >>> } >>> >>> >>> Does anyone have any idea how to solve this problem? >>> Thanks friends! >>> >>> --- >>> Wladiston Maurício de Paiva >>> http://wladistonpaiva.com.br >>> [email protected] >>> [email protected] >>> +55 (31) 8435 - 5380 >>> >>> >>> >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
