Best way to implement password change feature

In my user update form I want the user to be able to change his/her password.

By default the model password field contains the password (dotted), but what I want is to display two empty fields - one for new password and one for new password confirmation.

Can someone give me some guidance on the proper way to do this?

To display an empty field you can set $this->password=’’ in actionUpdate()

and if the for is POSTed check if it’s not empty to save it…

Just a note here…it is a good practice to have 3 password fields. First one requesting the current password, which you should validate against your DB and if successful than change with the newly provided one. Hope this makes sense.