$this->Session->setFlash(__d('users', 'Your account has been created. You should receive an e-mail shortly to authenticate your account. Once validated you will be able to login.'));
$this->Session->setFlash(__d('users', 'The url you accessed is not longer valid'));
return$this->redirect('/');
}
if ($this->{$this->modelClass}->save($data, array('validate' => false))) {
$this->_sendNewPassword($data);
$this->Session->setFlash(__d('users', 'Your password was sent to your registered email account'));
$this->redirect(array('action' => 'login'));
}
$this->Session->setFlash(__d('users', 'There was an error verifying your account. Please check the email you were sent, and retry the verification link.'));
$this->Session->setFlash(__d('users', 'You should receive an email with further instructions shortly'));
$this->redirect(array('action' => 'login'));
}
} else {
$this->Session->setFlash(__d('users', 'No user was found with that email.'));
$this->redirect($this->referer('/'));
}
}
$this->render('request_password_change');
}
/**
* Sets the cookie to remember the user
*
* @param array RememberMe (Cookie) component properties as array, like array('domain' => 'yourdomain.com')
* @param string Cookie data keyname for the userdata, its default is "User". This is set to User and NOT using the model alias to make sure it works with different apps with different user models across different (sub)domains.