@filesource * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP (tm) Project * @package cake * @subpackage cake.app.config * @since CakePHP(tm) v 0.2.9 * @version $Revision: 6296 $ * @modifiedby $LastChangedBy: phpnut $ * @lastmodified $Date: 2008-01-01 16:18:17 -0600 (Tue, 01 Jan 2008) $ The problem is: in the login action I set session variable for user and then redirect. After redirect cakephp is losing session. I tried with CAKE_SESSION_SAVE - 'php', 'cake' (with sessions folder writable), CAKE_SECURITY - 'high', 'medium','low' Nothing works. I searched on group but found no solution.
the code i have written is $login_name=$this->params['data']['User']['txtUname']; $this->usercount = $this->User->query("select count(*) as countval from medstat_users.users as User where PWD = '".$this->params ['data']['User']['txtPass']."'"); if($this->usercount['0']['0']['countval']=='1') { $this->User1 = $this->User->query("select * from medstat_users.users as User WHERE LoginID = '".$login_name."' AND PWD = '".$this->params['data']['User']['txtPass']."' and islocked < 3 "); $this->Session->write('SESSION_ADMIN_ID', $this->User1[0]['User'] ['ID']); $this->Session->write('SESSION_ADMIN_NAME', $this->User1[0] ['User']['LoginID']); $this->Session->write('SESSION_APP_ID', $this->User1[0]['User'] ['App_ID']); $this->Session->write('SESSION_DOC_ADDRESS', $this->User1[0] ['User']['Address']); $this->Session->write('SESSION_DOC_PHONE', $this->User1[0] ['User']['Phone']); $this->Session->write('SESSION_DOC_QALFY', $this->User1[0] ['User']['Qualification']); $this->redirect('/users/search'); } /** search function **/ function search() { $this->checkSession(); } function checkSession() { if (!$this->Session->read('SESSION_ADMIN_ID')) { $this->flash('Please Login to Access the Application','/users/ login'); } $this->set('SESSION_ADMIN_LEVEL',$this->Session->read ('SESSION_ADMIN_LEVEL')); $this->set('SESSION_ADMIN_ID',$this->Session->read ('SESSION_ADMIN_ID')); $this->set('SESSION_ADMIN_NAME',$this->Session->read ('SESSION_ADMIN_NAME')); $this->set('SESSION_TYPE',$this->Session->read('SESSION_TYPE')); } I request you to please give me a solution for the issue. Thanks & Regards, Vidya Hasten --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---