Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var $validate = array(
- 'username' => array(
- 'alpha' => array('rule' => 'alphanumeric',
- 'required' => true,
- 'message' => 'Avec un Username c\'est mieux ! '),
- 'isUnique' => array
- (
- 'rule' => 'isUnique',
- 'message' => 'Cette pseudo existe déjà.'
- )
- ),
- 'mail' => array(
- 'rule' =>'email',
- 'message'=>'Un Email?!'
- ),
- 'password' => array('rule' => array('confirmPassword', 'password'),
- 'message' => 'Password/Confirmation doesn\'t Match'),
- 'password_confirm' => array('rule' => 'alphanumeric',
- 'required' => true,
- 'message' => 'Une confirmation du password !?'),
- );
- function confirmPassword($data) {
- $valid = false;
- if ($data['password'] == Security::hash(Configure::read('Security.salt') . $this->data['User']['password_confirm'])) {
- $valid = true;
- }
- return $valid;
- }
Add Comment
Please, Sign In to add comment