I have a question about this module, I've followed the installation steps: — created first_name and last_name fields — added those fields to user template Then I created a newsletter template in which I called the module as mentioned:
$options = array (
'markup' => array(
'InputfieldSelect' => array(
'item' => "{out}"
)
),
'classes' => array(
'form' => 'form form__super-special-class',
'InputfieldRadios' => array(
'item' => 'form__item--options'
)
),
'prependMarkup' => "<div>{$page->prepend_markup}</div>",
'appendMarkup' => "<p>{$page->append_markup}</p>"
);
echo $modules->get('NewsletterSubscription')->render($options);
Finally I created a newsletter page. I can then open the page and subscribe, I receive the confirmation email but when I click on the link I get those errors (even though I appear in the users panel in pw):
Error: Exception: Method User::setAndSave does not exist or is not callable in this context (in /home/tenutaxyit/www/wire/core/Wire.php line 350)
#0 [internal function]: Wire->___callUnknown('setAndSave', Array)
#1 /home/tenutaxyit/www/wire/core/Wire.php(387): call_user_func_array(Array, Array)
#2 /home/tenutaxyit/www/wire/core/Wire.php(325): Wire->runHooks('callUnknown', Array)
#3 /home/tenutaxyit/www/wire/core/Wire.php(329): Wire->__call('callUnknown', Array)
#4 /home/tenutaxyit/www/wire/core/Wire.php(329): User->callUnknown('setAndSave', Array)
#5 /home/tenutaxyit/www/site/modules/NewsletterSubscription/NewsletterSubscription.module(216): Wire->__call('setAndSave', Array)
#6 /home/tenutaxyit/www/site/modules/NewsletterSubscription/NewsletterSubscription.module(216): User->setAndSave('status', 1)
#7 /home/tenutaxyit/www/site/modules/NewsletterSubscription/NewsletterSubscription.module(93): NewsletterSubscription->validateSubscribeToken()
#8 /home/tenutaxyit/www/site/templates/newsletter.php(22): NewsletterSubscri