title: cakephp auth component for editing info
body: <p>I'm trying to make a link to edit a user's info. The url for a person with id 1 would be users/edit/1</p>
  
  <pre><code>echo $this-&gt;Html-&gt;link('Edit Info', array( 
     'controller' =&gt; 'users',  
     'action' =&gt; 'edit',
      AuthComponent::user('id')
  )); 
  </code></pre>
  
  <p>The URL shows up correctly. However, I'm trying to restrict it so only the user with that id can edit their page. So, say user 4 tries to edit user 1's info, it will redirect. </p>
  
  <p>This is part of the action for edit in UsersController that should redirect. </p>
  
  <pre><code>if($id !== AuthComponent::user('id')){
          $this-&gt;redirect(array('controller'=&gt;'posts','action'=&gt; 'index'));
      }
  </code></pre>
  
  <p>I'm getting the following error </p>
  
  <pre><code>Parse error: syntax error, unexpected '=', expecting ')' in /Applications/XAMPP/xamppfiles/htdocs/cake/app/Controller/UsersController.php on line 42
  </code></pre>
  
  <p><strong>edit - got it to work, thanks for the help</strong></p>