Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
UserChangePassword.php
1 <?php
2 /**
3  * UserChangePassword class.
4  * UserChangePassword is the data structure for keeping
5  * user change password form data. It is used by the 'changepassword' action of 'UserController'.
6  */
7 class UserChangePassword extends CFormModel {
8  public $password;
9  public $verifyPassword;
10 
11  public function rules() {
12  return array(
13  array('password, verifyPassword', 'required'),
14  array('password', 'length', 'max'=>128, 'min' => 4,'message' => UserModule::t("Incorrect password (minimal length 4 symbols).")),
15  array('verifyPassword', 'compare', 'compareAttribute'=>'password', 'message' => UserModule::t("Retype Password is incorrect.")),
16  );
17  }
18 
19  /**
20  * Declares attribute labels.
21  */
22  public function attributeLabels()
23  {
24  return array(
25  'password'=>UserModule::t("password"),
26  'verifyPassword'=>UserModule::t("Retype Password"),
27  );
28  }
29 }