On Sat, Jun 16, 2012 at 6:44 AM, JonStark <[email protected]> wrote:
> I tried this, it's actually clever, but there's a flaw I guess.
>
> Since the extract is done when logging in, the follow link will still appear
> for all the users you will follow after, and disappear only when re-logging
> in.

Just update each array as they are modified.

$following = $this-Session->read('User.following');
$following[] = $this->Following->lastInsertId();
$this->Session->write('User.following', $following);

Same idea if a person is removed.

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to