I am using Silverstripe version 2.4.9 I copied the folder newsletters (version 0.5) from an old project done in SilverStripe 2.4.6 where the module worked perfectly, but in the new project, the module does not work while I store the email from the form, the server gives me this error:
============ ERROR ==============================================
User Error] Member::generateAutologinHash is deprecated - tokens are no longer saved directly into the database in plaintext. Use the return value of the Member::generateAutologinTokenAndHash to get the token instead.
POST /SilverStripe/contatti/newsletter-contatti/SubscriptionForm
Line 489 in C:\wamp\www\SilverStripe\sapphire\security\Member.php
Source
480
481 /**
482 * @deprecated 2.4
483 */
484 public function generateAutologinHash($lifetime = 2) {
485 user_error(
486 'Member::generateAutologinHash is deprecated - tokens are no longer saved directly into the database '.
487 'in plaintext. Use the return value of the Member::generateAutologinTokenAndHash to get the token '.
488 'instead.',
489 E_USER_ERROR);
============ END ERROR ============================================
This is the function called by the template
......
$getNewsletter
...........
Page.php
public function getNewsletter() {
$newsletter = $this->Children()->First();
if ($newsletter){
$formController = new SubscriptionPage_Controller($newsletter);
return $formController->SubscriptionForm()->fortemplate();
// or return $formController->Form()->renderWith('Form', 'your customise form template');
}
}
Does anyone know help me?
Thanks in advance to all for the help.
greetings
sorceress