Re: Auth component question

2011-02-21 Thread Tapan Kumar Thapa
Yes

QA:

idusernamepasswordemailfirst_name
last_namecreatedmodified
1adminfb1d00be1616be244194b049468f6c571c56d927
ad...@hindustantimes.comAdministratorAdmin\N\N

Development:

idusernamepasswordemailfirst_name
last_namecreatedmodified
1khbkfb1d00be1616be244194b049468f6c571c56d927
k...@khbk.comMahuaaTelevision\N\N

Please suggest.

Point noted: I am using cakephp 2.0 (cakephp-8cbd9fc) development version on
QA  and also using cakephp 2.0 (cakephp-'Not know') development version on
development machine.

Regards
Tapan Thapa
India

On Mon, Feb 21, 2011 at 1:18 PM, Jeremy Burns | Class Outfit 
jeremybu...@classoutfit.com wrote:

 And the tables contain the same data?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:46, Tapan Kumar Thapa wrote:

 Yes DB structure,code and model files are identical.

 From Development: (Fetched from mysql yog)

 CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`email` varchar(255) NOT NULL,
`first_name` varchar(40) NOT NULL,
`last_name` varchar(40) NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`,`email`)
  ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1

 From QA: (fetched from cli)

 mysql show create table users;

 +---+---+
 | Table | Create
 Table
 |

 +---+---+
 | users | CREATE TABLE `users` (
   `id` int(10) NOT NULL auto_increment,
   `username` varchar(40) NOT NULL,
   `password` varchar(40) NOT NULL,
   `email` varchar(255) NOT NULL,
   `first_name` varchar(40) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `created` datetime default NULL,
   `modified` datetime default NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `username` (`username`,`email`)
 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |

 +---+---+
 1 row in set (0.00 sec)

 mysql

 Please suggest.

 Regards
 Tapan Thapa

 On Mon, Feb 21, 2011 at 1:11 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 Then your value is not being set in the session and you won't be able to
 retrieve it. Are you database structures the same? Have you changed anything
 to do with your User model? Are the code sets identical?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:39, Tapan Kumar Thapa wrote:

 Please find the debug info from development machine and QA machine.

 Development:

 Array
 (
 [id] = 1
 [username] = khbk
 [email] = k...@khbk.com

 [first_name] = Mahuaa
 [last_name] = Television
 [created] =
 [modified] =
 )

 QA:

 Array
 (
 [username] = admin
 [password] = suresh

 )

 Please suggest

 Regards
 Tapan Thapa



 On Mon, Feb 21, 2011 at 1:07 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 What happens when you debug out the value of the auth session variables?
 Is the value there?

 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:

 Unfortunately i am not getting any error but my view shows blank in case
 no value retrieved from session for first_name. But if i change the code to
 read username from session it start displaying in my view.

 Please suggest.

 Regards
 Tapan Thapa

 On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
 

Re: Auth component question

2011-02-21 Thread Tapan Kumar Thapa
Hello Community,

Can you please suggest something?

Regards
Tapan Thapa
India

On Mon, Feb 21, 2011 at 1:37 PM, Tapan Kumar Thapa 
tapan.th...@hindustantimes.com wrote:

 Yes

 QA:

 idusernamepasswordemailfirst_name
 last_namecreatedmodified
 1adminfb1d00be1616be244194b049468f6c571c56d927
 ad...@hindustantimes.comAdministratorAdmin\N\N

 Development:

 idusernamepasswordemailfirst_name
 last_namecreatedmodified
 1khbkfb1d00be1616be244194b049468f6c571c56d927
 k...@khbk.comMahuaaTelevision\N\N

 Please suggest.

 Point noted: I am using cakephp 2.0 (cakephp-8cbd9fc) development version
 on QA  and also using cakephp 2.0 (cakephp-'Not know') development version
 on development machine.

 Regards
 Tapan Thapa
 India

 On Mon, Feb 21, 2011 at 1:18 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 And the tables contain the same data?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:46, Tapan Kumar Thapa wrote:

 Yes DB structure,code and model files are identical.

 From Development: (Fetched from mysql yog)

 CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`email` varchar(255) NOT NULL,
`first_name` varchar(40) NOT NULL,
`last_name` varchar(40) NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`,`email`)
  ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1

 From QA: (fetched from cli)

 mysql show create table users;

 +---+---+
 | Table | Create
 Table
 |

 +---+---+
 | users | CREATE TABLE `users` (
   `id` int(10) NOT NULL auto_increment,
   `username` varchar(40) NOT NULL,
   `password` varchar(40) NOT NULL,
   `email` varchar(255) NOT NULL,
   `first_name` varchar(40) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `created` datetime default NULL,
   `modified` datetime default NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `username` (`username`,`email`)
 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |

 +---+---+
 1 row in set (0.00 sec)

 mysql

 Please suggest.

 Regards
 Tapan Thapa

 On Mon, Feb 21, 2011 at 1:11 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 Then your value is not being set in the session and you won't be able to
 retrieve it. Are you database structures the same? Have you changed anything
 to do with your User model? Are the code sets identical?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:39, Tapan Kumar Thapa wrote:

 Please find the debug info from development machine and QA machine.

 Development:

 Array
 (
 [id] = 1
 [username] = khbk
 [email] = k...@khbk.com

 [first_name] = Mahuaa
 [last_name] = Television
 [created] =
 [modified] =
 )

 QA:

 Array
 (
 [username] = admin
 [password] = suresh

 )

 Please suggest

 Regards
 Tapan Thapa



 On Mon, Feb 21, 2011 at 1:07 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 What happens when you debug out the value of the auth session variables?
 Is the value there?

 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:

 Unfortunately i am not getting any error but my view shows blank in case
 no value retrieved from session for first_name. 

Re: Auth component question

2011-02-21 Thread Jeremy Burns | Class Outfit
If your code and data is identical (the data isn't actually identical, but I 
guess the differences are not important) then can you show your code? What is 
your log in method? Are you writing anything to the Auth session key anywhere 
else?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 21 Feb 2011, at 09:56, Tapan Kumar Thapa wrote:

 Hello Community,
 
 Can you please suggest something?
 
 Regards
 Tapan Thapa
 India
 
 On Mon, Feb 21, 2011 at 1:37 PM, Tapan Kumar Thapa 
 tapan.th...@hindustantimes.com wrote:
 Yes
 
 QA:
 
 idusernamepasswordemailfirst_namelast_name
 createdmodified
 1adminfb1d00be1616be244194b049468f6c571c56d927
 ad...@hindustantimes.comAdministratorAdmin\N\N
 
 Development:
 
 idusernamepasswordemailfirst_namelast_name
 createdmodified
 1khbkfb1d00be1616be244194b049468f6c571c56d927
 k...@khbk.comMahuaaTelevision\N\N
 
 Please suggest.
 
 Point noted: I am using cakephp 2.0 (cakephp-8cbd9fc) development version on 
 QA  and also using cakephp 2.0 (cakephp-'Not know') development version on 
 development machine.
 
 Regards
 Tapan Thapa
 India
 
 On Mon, Feb 21, 2011 at 1:18 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:
 And the tables contain the same data?
 
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.com
 http://www.classoutfit.com
 
 On 21 Feb 2011, at 07:46, Tapan Kumar Thapa wrote:
 
 Yes DB structure,code and model files are identical.
 
 From Development: (Fetched from mysql yog)
 
 CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`email` varchar(255) NOT NULL,
`first_name` varchar(40) NOT NULL,
`last_name` varchar(40) NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`,`email`)
  ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
 
 From QA: (fetched from cli)
 
 mysql show create table users;
 +---+---+
 | Table | Create Table   
  
  
  
  
|
 +---+---+
 | users | CREATE TABLE `users` (
   `id` int(10) NOT NULL auto_increment,
   `username` varchar(40) NOT NULL,
   `password` varchar(40) NOT NULL,
   `email` varchar(255) NOT NULL,
   `first_name` varchar(40) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `created` datetime default NULL,
   `modified` datetime default NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `username` (`username`,`email`)
 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |
 +---+---+
 1 row in set (0.00 sec)
 
 mysql
 
 Please suggest.
 
 Regards
 Tapan Thapa
 
 On Mon, Feb 21, 2011 at 1:11 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:
 Then your value is not being set in the session and you won't be able to 
 retrieve it. Are you database structures the same? Have you changed anything 
 to do with your User model? Are the code sets identical?
 
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.com
 http://www.classoutfit.com
 
 On 21 Feb 2011, at 07:39, Tapan Kumar Thapa wrote:
 
 Please find the debug info from development machine and QA 

Re: Auth component question

2011-02-21 Thread Tapan Kumar Thapa
i am writing startdate and enddate to the session but i don't know if i am
writing in Auth session or not.

Please find my view vode for reading first_name from session.

View:

p align=centerb?php echo 'Welcome ' .
$this-Session-read('Auth.User.first_name'); ?/b/p

My controller code which writes startdate and enddate in session:
$this-Session-write('startdate', $startdate);
$this-Session-write('enddate', $enddate);

Fyi: All is working fine in my development machine but i don't know why in
QA.

Please suggest.

Regards
Tapan Thapa
India
On Mon, Feb 21, 2011 at 3:31 PM, Jeremy Burns | Class Outfit 
jeremybu...@classoutfit.com wrote:

 If your code and data is identical (the data isn't actually identical, but
 I guess the differences are not important) then can you show your code? What
 is your log in method? Are you writing anything to the Auth session key
 anywhere else?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 09:56, Tapan Kumar Thapa wrote:

 Hello Community,

 Can you please suggest something?

 Regards
 Tapan Thapa
 India

 On Mon, Feb 21, 2011 at 1:37 PM, Tapan Kumar Thapa 
 tapan.th...@hindustantimes.com wrote:

 Yes

 QA:

 idusernamepasswordemailfirst_name
 last_namecreatedmodified
 1adminfb1d00be1616be244194b049468f6c571c56d927
 ad...@hindustantimes.comAdministratorAdmin\N\N

 Development:

 idusernamepasswordemailfirst_name
 last_namecreatedmodified
 1khbkfb1d00be1616be244194b049468f6c571c56d927
 k...@khbk.comMahuaaTelevision\N\N

 Please suggest.

 Point noted: I am using cakephp 2.0 (cakephp-8cbd9fc) development version
 on QA  and also using cakephp 2.0 (cakephp-'Not know') development version
 on development machine.

 Regards
 Tapan Thapa
 India

 On Mon, Feb 21, 2011 at 1:18 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 And the tables contain the same data?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:46, Tapan Kumar Thapa wrote:

 Yes DB structure,code and model files are identical.

 From Development: (Fetched from mysql yog)

 CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`email` varchar(255) NOT NULL,
`first_name` varchar(40) NOT NULL,
`last_name` varchar(40) NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`,`email`)
  ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1

 From QA: (fetched from cli)

 mysql show create table users;

 +---+---+
 | Table | Create
 Table
 |

 +---+---+
 | users | CREATE TABLE `users` (
   `id` int(10) NOT NULL auto_increment,
   `username` varchar(40) NOT NULL,
   `password` varchar(40) NOT NULL,
   `email` varchar(255) NOT NULL,
   `first_name` varchar(40) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `created` datetime default NULL,
   `modified` datetime default NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `username` (`username`,`email`)
 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |

 +---+---+
 1 row in set (0.00 sec)

 mysql

 Please suggest.

 Regards
 Tapan Thapa

 On Mon, Feb 21, 2011 at 1:11 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 Then your value is not being set in the session and you won't be able to
 retrieve it. Are you database structures the same? Have you changed 
 anything
 to do with your User 

Re: Auth component question

2011-02-21 Thread Tapan Kumar Thapa
Please find my complete code of controller fyi:

?php

class UsersController extends AppController {

var $name = 'Users';
var $uses = array('Incoming', 'User');
var $helpers = array('Html', 'Paginator', 'Form', 'Csv');
var $components = array('Auth');
var $paginate = array(
'limit' = 20,
'fields' = array('date', 'time', 'msisdn', 'shortcode', 'operator',
'circle', 'keyword', 'answer', 'age', 'gender', 'status'),
'order' = array('Incoming.id' = 'desc')
);

function beforeFilter() {
$this-Auth-autoRedirect = false;
parent::beforeFilter();
//$this-Auth-allow('register');
}

function index() {
$this-redirect(array('action' = 'login'));
}

function login() {
$this-User-set($this-data);
if ($this-User-validates()) {
if (isset($this-data['User'])) {
if ($this-Auth-login($this-data['User'])) {
$this-Session-setFlash('You\'ve successfully logged
in.');
//$this-redirect('view');
$this-redirect('report');
}
$this-Session-setFlash(Username/Password is incorrect);
}
}
}

function logout() {
$this-Auth-logout();
$this-Session-setFlash('You are now logged out.');
$this-redirect('login');
}

function view() {
if ($this-data) {
$startday = $this-data['Incoming']['StartDate']['day'];
$startmonth = $this-data['Incoming']['StartDate']['month'];
$startyear = $this-data['Incoming']['StartDate']['year'];
$starthour = $this-data['Incoming']['StartDate']['hour'];
$startmin = $this-data['Incoming']['StartDate']['min'];
$startdate = $startyear-$startmonth-$startday
$starthour:$startmin:00;
$endday = $this-data['Incoming']['EndDate']['day'];
$endmonth = $this-data['Incoming']['EndDate']['month'];
$endyear = $this-data['Incoming']['EndDate']['year'];
$endhour = $this-data['Incoming']['EndDate']['hour'];
$endmin = $this-data['Incoming']['EndDate']['min'];
$enddate = $endyear-$endmonth-$endday $endhour:$endmin:00;
$this-Session-write('startdate', $startdate);
$this-Session-write('enddate', $enddate);
$this-set('records', $this-paginate('Incoming',
array(Incoming.created = '$startdate' AND Incoming.created = '$enddate'
)));
} else {
$startdate = $this-Session-read('startdate');
$enddate = $this-Session-read('enddate');
$this-set('records', $this-paginate('Incoming',
array(Incoming.created = '$startdate' AND Incoming.created = '$enddate'
)));
}
}

function report() {

}

function export() {
$this-layout = '';
$startdate = $this-Session-read('startdate');
$enddate = $this-Session-read('enddate');
$this-set('Export', $this-Incoming-find('all', array(
'fields' = array('date', 'time', 'msisdn', 'shortcode',
'operator', 'circle', 'keyword', 'answer', 'age', 'gender'),
'order' = Incoming.id desc,
'conditions' = array(Incoming.created = '$startdate'
AND Incoming.created = '$enddate' ),
'contain' = false)));
}

}

?

Regards
Tapan Thapa
India

On Mon, Feb 21, 2011 at 4:06 PM, Tapan Kumar Thapa 
tapan.th...@hindustantimes.com wrote:

 i am writing startdate and enddate to the session but i don't know if i am
 writing in Auth session or not.

 Please find my view vode for reading first_name from session.

 View:

 p align=centerb?php echo 'Welcome ' .
 $this-Session-read('Auth.User.first_name'); ?/b/p

 My controller code which writes startdate and enddate in session:
 $this-Session-write('startdate', $startdate);
 $this-Session-write('enddate', $enddate);

 Fyi: All is working fine in my development machine but i don't know why in
 QA.


 Please suggest.

 Regards
 Tapan Thapa
 India
 On Mon, Feb 21, 2011 at 3:31 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 If your code and data is identical (the data isn't actually identical, but
 I guess the differences are not important) then can you show your code? What
 is your log in method? Are you writing anything to the Auth session key
 anywhere else?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 09:56, Tapan Kumar Thapa wrote:

 Hello Community,

 Can you please suggest something?

 Regards
 Tapan Thapa
 India

 On Mon, Feb 21, 2011 at 1:37 PM, Tapan Kumar Thapa 
 tapan.th...@hindustantimes.com wrote:

 Yes

 QA:

 idusernamepasswordemailfirst_name
 last_namecreatedmodified
 1adminfb1d00be1616be244194b049468f6c571c56d927
 ad...@hindustantimes.comAdministratorAdmin\N\N

 

Re: Auth component question

2011-02-21 Thread Ryan Schmidt

On Feb 21, 2011, at 02:07, Tapan Kumar Thapa wrote:

 Point noted: I am using cakephp 2.0 (cakephp-8cbd9fc) development version on 
 QA  and also using cakephp 2.0 (cakephp-'Not know') development version on 
 development machine.


I see 8cbd9fc is recent (from 2011-02-19) but if you don't know what version is 
on your development machine, try updating it to the same CakePHP version. 
Perhaps there is a CakePHP bug.


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth component question

2011-02-20 Thread andy_the ultimate baker
will u please tell what error is coming out?

On Feb 21, 12:12 pm, Tapan Kumar Thapa
tapan.th...@hindustantimes.com wrote:
 Hello Community,

 I am using auth component in my code and while retrieving first_name from
 session ($this-Session-read('Auth.User.first_name')) on my development
 machine(windows with wamp), it is working fine.

 However if deploying the same code on QA machine (linux with apache and php
 separately), i am not able to get the first_name from session although i
 have noticed if i am trying to retrieve username or password from session,
 it is working.

 Working on QA - $this-Session-read('Auth.User.username')
 Working on QA - $this-Session-read('Auth.User.password')
 *Not working on QA - $this-Session-read('Auth.User.first_name) or
 $this-Session-read('Auth.User.email')*

 Please suggest.

 Regards
 Tapan Thapa
 India

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth component question

2011-02-20 Thread Tapan Kumar Thapa
Unfortunately i am not getting any error but my view shows blank in case no
value retrieved from session for first_name. But if i change the code to
read username from session it start displaying in my view.

Please suggest.

Regards
Tapan Thapa

On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
anandghaywankar...@gmail.com wrote:

 will u please tell what error is coming out?

 On Feb 21, 12:12 pm, Tapan Kumar Thapa
 tapan.th...@hindustantimes.com wrote:
  Hello Community,
 
  I am using auth component in my code and while retrieving first_name from
  session ($this-Session-read('Auth.User.first_name')) on my development
  machine(windows with wamp), it is working fine.
 
  However if deploying the same code on QA machine (linux with apache and
 php
  separately), i am not able to get the first_name from session although i
  have noticed if i am trying to retrieve username or password from
 session,
  it is working.
 
  Working on QA - $this-Session-read('Auth.User.username')
  Working on QA - $this-Session-read('Auth.User.password')
  *Not working on QA - $this-Session-read('Auth.User.first_name) or
  $this-Session-read('Auth.User.email')*
 
  Please suggest.
 
  Regards
  Tapan Thapa
  India

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth component question

2011-02-20 Thread Jeremy Burns | Class Outfit
What happens when you debug out the value of the auth session variables? Is the 
value there?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:

 Unfortunately i am not getting any error but my view shows blank in case no 
 value retrieved from session for first_name. But if i change the code to read 
 username from session it start displaying in my view.
 
 Please suggest.
 
 Regards
 Tapan Thapa
 
 On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
 anandghaywankar...@gmail.com wrote:
 will u please tell what error is coming out?
 
 On Feb 21, 12:12 pm, Tapan Kumar Thapa
 tapan.th...@hindustantimes.com wrote:
  Hello Community,
 
  I am using auth component in my code and while retrieving first_name from
  session ($this-Session-read('Auth.User.first_name')) on my development
  machine(windows with wamp), it is working fine.
 
  However if deploying the same code on QA machine (linux with apache and php
  separately), i am not able to get the first_name from session although i
  have noticed if i am trying to retrieve username or password from session,
  it is working.
 
  Working on QA - $this-Session-read('Auth.User.username')
  Working on QA - $this-Session-read('Auth.User.password')
  *Not working on QA - $this-Session-read('Auth.User.first_name) or
  $this-Session-read('Auth.User.email')*
 
  Please suggest.
 
  Regards
  Tapan Thapa
  India
 
 --
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php
 
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
  
  
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth component question

2011-02-20 Thread Tapan Kumar Thapa
Please find the debug info from development machine and QA machine.

Development:

Array
(
[id] = 1
[username] = khbk
[email] = k...@khbk.com
[first_name] = Mahuaa
[last_name] = Television
[created] =
[modified] =
)

QA:

Array
(
[username] = admin
[password] = suresh
)

Please suggest

Regards
Tapan Thapa



On Mon, Feb 21, 2011 at 1:07 PM, Jeremy Burns | Class Outfit 
jeremybu...@classoutfit.com wrote:

 What happens when you debug out the value of the auth session variables? Is
 the value there?

 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:

 Unfortunately i am not getting any error but my view shows blank in case no
 value retrieved from session for first_name. But if i change the code to
 read username from session it start displaying in my view.

 Please suggest.

 Regards
 Tapan Thapa

 On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
 anandghaywankar...@gmail.com wrote:

 will u please tell what error is coming out?

 On Feb 21, 12:12 pm, Tapan Kumar Thapa
 tapan.th...@hindustantimes.com wrote:
  Hello Community,
 
  I am using auth component in my code and while retrieving first_name
 from
  session ($this-Session-read('Auth.User.first_name')) on my development
  machine(windows with wamp), it is working fine.
 
  However if deploying the same code on QA machine (linux with apache and
 php
  separately), i am not able to get the first_name from session although i
  have noticed if i am trying to retrieve username or password from
 session,
  it is working.
 
  Working on QA - $this-Session-read('Auth.User.username')
  Working on QA - $this-Session-read('Auth.User.password')
  *Not working on QA - $this-Session-read('Auth.User.first_name) or
  $this-Session-read('Auth.User.email')*
 
  Please suggest.
 
  Regards
  Tapan Thapa
  India

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php



 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth component question

2011-02-20 Thread Jeremy Burns | Class Outfit
Then your value is not being set in the session and you won't be able to 
retrieve it. Are you database structures the same? Have you changed anything to 
do with your User model? Are the code sets identical?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 21 Feb 2011, at 07:39, Tapan Kumar Thapa wrote:

 Please find the debug info from development machine and QA machine.
 
 Development:
 Array
 (
 [id] = 1
 [username] = khbk
 [email] = k...@khbk.com
 
 [first_name] = Mahuaa
 [last_name] = Television
 [created] = 
 [modified] = 
 )
 QA:
 Array
 (
 [username] = admin
 [password] = suresh
 
 )
 
 Please suggest
 
 Regards
 Tapan Thapa
 
 
 
 On Mon, Feb 21, 2011 at 1:07 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:
 What happens when you debug out the value of the auth session variables? Is 
 the value there?
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.com
 http://www.classoutfit.com
 
 On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:
 
 Unfortunately i am not getting any error but my view shows blank in case no 
 value retrieved from session for first_name. But if i change the code to 
 read username from session it start displaying in my view.
 
 Please suggest.
 
 Regards
 Tapan Thapa
 
 On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
 anandghaywankar...@gmail.com wrote:
 will u please tell what error is coming out?
 
 On Feb 21, 12:12 pm, Tapan Kumar Thapa
 tapan.th...@hindustantimes.com wrote:
  Hello Community,
 
  I am using auth component in my code and while retrieving first_name from
  session ($this-Session-read('Auth.User.first_name')) on my development
  machine(windows with wamp), it is working fine.
 
  However if deploying the same code on QA machine (linux with apache and php
  separately), i am not able to get the first_name from session although i
  have noticed if i am trying to retrieve username or password from session,
  it is working.
 
  Working on QA - $this-Session-read('Auth.User.username')
  Working on QA - $this-Session-read('Auth.User.password')
  *Not working on QA - $this-Session-read('Auth.User.first_name) or
  $this-Session-read('Auth.User.email')*
 
  Please suggest.
 
  Regards
  Tapan Thapa
  India
 
 --
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php
 
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
  
  
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php
 
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
  
  
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php
 
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
  
  
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Auth component question

2011-02-20 Thread Tapan Kumar Thapa
Yes DB structure,code and model files are identical.

From Development: (Fetched from mysql yog)

CREATE TABLE `users` (
   `id` int(10) NOT NULL AUTO_INCREMENT,
   `username` varchar(40) NOT NULL,
   `password` varchar(40) NOT NULL,
   `email` varchar(255) NOT NULL,
   `first_name` varchar(40) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `created` datetime DEFAULT NULL,
   `modified` datetime DEFAULT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `username` (`username`,`email`)
 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1

From QA: (fetched from cli)

mysql show create table users;
+---+---+
| Table | Create
Table
|
+---+---+
| users | CREATE TABLE `users` (
  `id` int(10) NOT NULL auto_increment,
  `username` varchar(40) NOT NULL,
  `password` varchar(40) NOT NULL,
  `email` varchar(255) NOT NULL,
  `first_name` varchar(40) NOT NULL,
  `last_name` varchar(40) NOT NULL,
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `username` (`username`,`email`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |
+---+---+
1 row in set (0.00 sec)

mysql

Please suggest.

Regards
Tapan Thapa

On Mon, Feb 21, 2011 at 1:11 PM, Jeremy Burns | Class Outfit 
jeremybu...@classoutfit.com wrote:

 Then your value is not being set in the session and you won't be able to
 retrieve it. Are you database structures the same? Have you changed anything
 to do with your User model? Are the code sets identical?


 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:39, Tapan Kumar Thapa wrote:

 Please find the debug info from development machine and QA machine.

 Development:

 Array
 (
 [id] = 1
 [username] = khbk
 [email] = k...@khbk.com

 [first_name] = Mahuaa
 [last_name] = Television
 [created] =
 [modified] =
 )

 QA:

 Array
 (
 [username] = admin
 [password] = suresh

 )

 Please suggest

 Regards
 Tapan Thapa



 On Mon, Feb 21, 2011 at 1:07 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:

 What happens when you debug out the value of the auth session variables?
 Is the value there?

 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:

 Unfortunately i am not getting any error but my view shows blank in case
 no value retrieved from session for first_name. But if i change the code to
 read username from session it start displaying in my view.

 Please suggest.

 Regards
 Tapan Thapa

 On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
 anandghaywankar...@gmail.com wrote:

 will u please tell what error is coming out?

 On Feb 21, 12:12 pm, Tapan Kumar Thapa
 tapan.th...@hindustantimes.com wrote:
  Hello Community,
 
  I am using auth component in my code and while retrieving first_name
 from
  session ($this-Session-read('Auth.User.first_name')) on my
 development
  machine(windows with wamp), it is working fine.
 
  However if deploying the same code on QA machine (linux with apache and
 php
  separately), i am not able to get the first_name from session although
 i
  have noticed if i am trying to retrieve username or password from
 session,
  it is working.
 
  Working on QA - $this-Session-read('Auth.User.username')
  Working on QA - $this-Session-read('Auth.User.password')
  *Not working on QA - $this-Session-read('Auth.User.first_name) or
  $this-Session-read('Auth.User.email')*
 
  Please suggest.
 
  Regards
  Tapan Thapa
  India

 --
 Our newest site for the community: CakePHP Video Tutorials
 

Re: Auth component question

2011-02-20 Thread Jeremy Burns | Class Outfit
And the tables contain the same data?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 21 Feb 2011, at 07:46, Tapan Kumar Thapa wrote:

 Yes DB structure,code and model files are identical.
 
 From Development: (Fetched from mysql yog)
 
 CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`password` varchar(40) NOT NULL,
`email` varchar(255) NOT NULL,
`first_name` varchar(40) NOT NULL,
`last_name` varchar(40) NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`,`email`)
  ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
 
 From QA: (fetched from cli)
 
 mysql show create table users;
 +---+---+
 | Table | Create Table
   
   
   
   
   |
 +---+---+
 | users | CREATE TABLE `users` (
   `id` int(10) NOT NULL auto_increment,
   `username` varchar(40) NOT NULL,
   `password` varchar(40) NOT NULL,
   `email` varchar(255) NOT NULL,
   `first_name` varchar(40) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `created` datetime default NULL,
   `modified` datetime default NULL,
   PRIMARY KEY  (`id`),
   UNIQUE KEY `username` (`username`,`email`)
 ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |
 +---+---+
 1 row in set (0.00 sec)
 
 mysql
 
 Please suggest.
 
 Regards
 Tapan Thapa
 
 On Mon, Feb 21, 2011 at 1:11 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:
 Then your value is not being set in the session and you won't be able to 
 retrieve it. Are you database structures the same? Have you changed anything 
 to do with your User model? Are the code sets identical?
 
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.com
 http://www.classoutfit.com
 
 On 21 Feb 2011, at 07:39, Tapan Kumar Thapa wrote:
 
 Please find the debug info from development machine and QA machine.
 
 Development:
 Array
 (
 [id] = 1
 [username] = khbk
 [email] = k...@khbk.com
 
 [first_name] = Mahuaa
 [last_name] = Television
 [created] = 
 [modified] = 
 )
 QA:
 Array
 (
 [username] = admin
 [password] = suresh
 
 )
 
 Please suggest
 
 Regards
 Tapan Thapa
 
 
 
 On Mon, Feb 21, 2011 at 1:07 PM, Jeremy Burns | Class Outfit 
 jeremybu...@classoutfit.com wrote:
 What happens when you debug out the value of the auth session variables? Is 
 the value there?
 
 Jeremy Burns
 Class Outfit
 
 jeremybu...@classoutfit.com
 http://www.classoutfit.com
 
 On 21 Feb 2011, at 07:34, Tapan Kumar Thapa wrote:
 
 Unfortunately i am not getting any error but my view shows blank in case no 
 value retrieved from session for first_name. But if i change the code to 
 read username from session it start displaying in my view.
 
 Please suggest.
 
 Regards
 Tapan Thapa
 
 On Mon, Feb 21, 2011 at 12:52 PM, andy_the ultimate baker 
 anandghaywankar...@gmail.com wrote:
 will u please tell what error is coming out?
 
 On Feb 21, 12:12 pm, Tapan Kumar Thapa
 tapan.th...@hindustantimes.com wrote:
  Hello Community,
 
  I am using auth component in my code and while retrieving first_name from
  session ($this-Session-read('Auth.User.first_name')) on my development
  machine(windows with wamp), it is 

Re: Auth component question

2009-06-05 Thread John Andersen

What is the url of your login page?
What is your settings of the auth component?
What does your login code look like?
Enjoy,
   John

On Jun 5, 10:04 am, lakers fan lakersfa...@msn.com wrote:
 Hello,

      Whenever I goto login page I get this auto error : Invalid username and 
 password. Dont know why auth component automatically validates every time i 
 go to login page.

 Is there anything that i m missing?

 Thanks,

 Bharani

 _
 Hotmail® has ever-growing storage! Don’t worry about storage 
 limits.http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_...
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth component question

2009-06-05 Thread Miles J

Auth DOES automatically validate, but it should only do it when you
post the form.

Whats your settings.
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Auth component question on CAKE 1.2

2008-10-24 Thread Dardo Sordi Bogado

Make sure the action can be reached by the user (is allowed/public),
then in the action call $this-Auth-login($data);

HTH,
- Dardo Sordi

On Fri, Oct 24, 2008 at 6:20 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

 Hi
 I have a question about the Auth component in CKAE 1.2
 In my application I have a method to authenticate users that is NOT
 based on username and password.
 I would use the same the Auth component to do this.
 Can someone tell me how can I do this?
 Many Thanks

 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Auth Component Question

2008-04-26 Thread Chris Hartjes

On Sat, Apr 26, 2008 at 3:05 AM, Kyle Decot [EMAIL PROTECTED] wrote:
  function login() {

  if ($this-Auth-user()) {

  echo working so far;

  }
  else { echo not working at all; }

  }

  the page always returns not working at all. Am I doing something
  wrong with this tutorial? Is there another way I should be going about
  this? Thank you as always for the help.

According to the API:

Returns:
array User record, or null if no user is logged in

So, if you keep getting null that means you're not successully logged
in, so I suspect that the problem might be somewhere else.  I suggest
you paste your code in http://bin.cakephp.org so others can take a
look at your entire setup.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---