title: Yii, best way to implement "user change of password"
body: <p>I'm using Yii for an application, I'm writing a very simple user management, like registering, deleting and updating users... For updating the existing user I need to check the old password first before change it to the new inserted password. So here is the fields I have in the form:</p>
  
  <pre><code>username:----
  old_password:---
  new_password:---
  </code></pre>
  
  <p>and my user table looks like this:</p>
  
  <pre><code>id, username, password
  </code></pre>
  
  <p>How can I validate the old_password before updating it with the new_password? I know the usual php coding, but I want to know if there are any Yii tricks that does this automatically...</p>
  
  <p>Thanks in advance</p>