title: CakePHP 2.0 twitter-like follow button
body: <p>I can't help myself and it's currently annoying, and yes, I used google a lot.</p>
  
  <h1>What I need:</h1>
  
  <p>A twitterlike <code>follow</code> button with the <code>action</code> to follow user.</p>
  
  <h2>What I already did:</h2>
  
  <h1>Database</h1>
  
  <p><code>users</code> table: id, username, password, ...</p>
  
  <p><code>users_users</code> table: id, user_id, follower_id</p>
  
  <h1>Code</h1>
  
  <p>In model <code>User.php</code></p>
  
  <pre><code>public $hasAndBelongsToMany = array(
  'Follower' =&gt; array(
    'className' =&gt; 'User',
    'joinTable' =&gt; 'users_users',
    'foreignKey' =&gt; 'user_id',
    'associationForeignKey' =&gt; 'follower_id',
    'unique' =&gt; 'keepExisting',
  ) 
  );
  </code></pre>
  
  <p>In <code>UsersController.php</code></p>
  
  <pre><code>public function follow() {
  /*need help here*/
  }
  </code></pre>
  
  <p>In <code>Users\index.ctp</code></p>
  
  <pre><code>&lt;?php if ($current_user['id'] != $user['User']['id']) echo $this-&gt;Html-&gt;link('Follow', array('action' =&gt; 'follow', $user['User']['id'])); ?&gt;
  </code></pre>