Try using:

$user = $this->User->find('first', array('conditions' => array('User.email'
=> $email_address)));

Although in most applications it's usually best to get the current user's id
from the auth component session data.
i.e. $this->Auth->user('id');

Unless ofcourse you're doing something a little bit different

Hth

On 11 January 2011 09:03, Spha ps <pss...@gmail.com> wrote:

> Hi all,
>
> I was wonder how would i go about check the users table to see if an email
> exists if it does get that id to add a new post for that user ?
>
> thanks in advance
> Spha
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to