/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /** * Class used for user authentication on the league website * */ class User extends AppModel { var $name = 'User'; 'on' => 'create'), 'required' => true, 'message' => 'Please enter a username'), 'message' => 'Passwords do not match'), 'required' => true) ); function confirmPassword($data, $fieldName) { $valid = false; if ($data['password'] == Security::hash(Configure::read('Security.salt') . $this->data['User']['password_confirm'])) { $valid = true; } return $valid; } } ?>