You should look at this:

http://book.cakephp.org/view/1017/Retrieving-Your-Data

and this:

http://book.cakephp.org/view/1031/Saving-Your-Data

On 11 January 2011 09:52, Spha ps <[email protected]> wrote:

> Ok I will try this in the mean while but what I am doing is setting cookies
> so that it recognises that specific users details when they add info to the
> database so they enter their email among other things so thats why im using
> email to check for their details so that if they already exist then i add a
> new post for the same user and not add onther user with the same info but
> different id
>
>
> On Tue, Jan 11, 2011 at 11:34 AM, Stephen 
> <[email protected]>wrote:
>
>> 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 <[email protected]> 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 [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]<cake-php%[email protected]>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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<cake-php%[email protected]>For
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>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 [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

Reply via email to