title: how to delete records in cakephp
body: <p>can anybody tell me how to delete records from the database?
  I'm done with the rest part only deletion remains. I'm running the deletion command but 
  the data is not deleted from the database.Actuaaly i created an action in controller(delete_user) which contains the code for deleting the user from the database.
  email value is stored in a session and i'm accessing it;s value using session read function
  in the next controller.</p>
  
  <p><code>function delete_user()
        {
       $email=$this-&gt;Session-&gt;read('User.email');
           $this-&gt;User-&gt;delete($email, $cascade = true);
           echo $this-&gt;Session-&gt;delete('User.email');
          echo $this-&gt;Session-&gt;delete('User.username');
          $this-&gt;redirect(array('action' =&gt; 'login')); 
        }   );</code></p>
  
  <p>i'm creating a link in home(View) page. and it is like this.</p>
  
  <pre><code>a href='/cakephp/cakephp/Users/delete_user'&gt;Delete Profile&lt;/a&gt;
  </code></pre>
  
  <p>i'm doing it right or wrong?</p>