| 56 | | 'login' => VALID_NOT_EMPTY, |
| 57 | | 'pwd' => VALID_NOT_EMPTY, |
| 58 | | 'username' => VALID_NOT_EMPTY, |
| 59 | | 'name' => VALID_NOT_EMPTY, |
| 60 | | 'email' => VALID_EMAIL |
| 61 | | ); |
| 62 | | |
| | 56 | 'login' => VALID_NOT_EMPTY, |
| | 57 | 'pwd' => VALID_NOT_EMPTY, |
| | 58 | 'username' => VALID_NOT_EMPTY, |
| | 59 | 'name' => VALID_NOT_EMPTY, |
| | 60 | 'email' => VALID_EMAIL |
| | 61 | ); |
| | 62 | /* |
| | 63 | I will work on this later |
| | 64 | public $validate = array( |
| | 65 | 'username' => array('rule' => 'alphanumeric', |
| | 66 | 'required' => true, |
| | 67 | 'message' => 'Please enter a username'), |
| | 68 | 'pwd' => array('rule' => array('confirmPassword', 'password'), |
| | 69 | 'message' => 'Passwords do not match'), |
| | 70 | 'pwd_confirm' => array('rule' => 'alphanumeric', |
| | 71 | 'required' => true) |
| | 72 | ); |
| | 73 | */ |
| | 74 | |
| | 75 | public function confirmPassword($data) |
| | 76 | { |
| | 77 | $valid = false; |
| | 78 | |
| | 79 | if ($data['password'] == Security::hash(Configure::read('Security.salt') . $this->data['User']['password_confirm'])) |
| | 80 | { |
| | 81 | $valid = true; |
| | 82 | } |
| | 83 | |
| | 84 | return $valid; |
| | 85 | } |
| | 86 | |