Re: Auth Session question

2009-06-03 Thread cake_baker

it worked thanks


On Jun 2, 10:37 am, brian bally.z...@gmail.com wrote:
 On Mon, Jun 1, 2009 at 1:20 PM, cake_baker muni...@hotmail.com wrote:

  ok here is the full the details

  i'm using a star rating plugin that need user.id in the Session

  define('RATING_SESSION_USER_ID', 'User.id');

 This defines the session key? You can get Auth's session info using
 $this-Session-read('Auth.User.id') so, in this case, 'Auth.User.id'
 should work for your define().

 I've never used the plugin, so if this doesn't work, maybe you should
 re-send your query with Star rating somewhere in the subject line.
--~--~-~--~~~---~--~~
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 Session question

2009-06-02 Thread brian

On Mon, Jun 1, 2009 at 1:20 PM, cake_baker muni...@hotmail.com wrote:

 ok here is the full the details

 i'm using a star rating plugin that need user.id in the Session

 define('RATING_SESSION_USER_ID', 'User.id');

This defines the session key? You can get Auth's session info using
$this-Session-read('Auth.User.id') so, in this case, 'Auth.User.id'
should work for your define().

I've never used the plugin, so if this doesn't work, maybe you should
re-send your query with Star rating somewhere in the subject line.

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



Auth Session question

2009-06-01 Thread cake_baker

How you write user.id  a Session with auth i did this but dosent work

Login

  !$user = $this-Auth-user();
  $this-Session-write('User.id', $user['User']['id']);



logout
 $this-Session-del('User.id');



Thank you

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

2009-06-01 Thread brian

If you're using Auth you don't need to store the User ID in the
session. Just grab it with $this-Auth-user('id') whenever you need
it.

On Mon, Jun 1, 2009 at 9:55 AM, cake_baker muni...@hotmail.com wrote:

 How you write user.id  a Session with auth i did this but dosent work

 Login

  !$user = $this-Auth-user();
  $this-Session-write('User.id', $user['User']['id']);



 logout
  $this-Session-del('User.id');



 Thank you

 


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

2009-06-01 Thread cake_baker

ok here is the full the details

i'm using a star rating plugin that need user.id in the Session
define('RATING_SESSION_USER_ID', 'User.id');
so i need the user.id to written in the Session unless you know an
other solution

it wont work with out this

On Jun 1, 9:12 am, brian bally.z...@gmail.com wrote:
 If you're using Auth you don't need to store the User ID in the
 session. Just grab it with $this-Auth-user('id') whenever you need
 it.



 On Mon, Jun 1, 2009 at 9:55 AM, cake_baker muni...@hotmail.com wrote:

  How you write user.id  a Session with auth i did this but dosent work

  Login

   !$user = $this-Auth-user();
   $this-Session-write('User.id', $user['User']['id']);

  logout
   $this-Session-del('User.id');

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