<?php

class RefreshPasswordForm extends FormModel
{
  public $username;
  public $old_password;
  public $new_password;
  public $repeat_new_password;
    
  public function rules()
  {
    return array(
      array('username, old_password, new_password, repeat_new_password', 'required'),
      array('new_password', 'compare', 'compareAttribute'=>'repeat_new_password'),
    );
  }

  public function myAttributeLabels()
  {
    return array(
      'username' => Yii::t('app', 'Username'),
      'old_password' => Yii::t('app', 'Old password'),
      'new_password' => Yii::t('app', 'New password'),
      'repeat_new_password' => Yii::t('app', 'Repeat new password'),
    );
  }
    
    
}
